Skip to content

Commit ea4fab7

Browse files
author
jantje
committed
Adding another test when trying to save scope data due to startup error
java.lang.NullPointerException at it.baeyens.arduino.monitor.views.ScopeView$3.handleEvent(ScopeView.java:187) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
1 parent e63001b commit ea4fab7

File tree

1 file changed

+4
-2
lines changed
  • it.baeyens.arduino.monitor/src/it/baeyens/arduino/monitor/views

1 file changed

+4
-2
lines changed

it.baeyens.arduino.monitor/src/it/baeyens/arduino/monitor/views/ScopeView.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ public void handleEvent(Event event) {
184184
SWT.SAVE);
185185
dialog.setFilterExtensions(new String[] { "*.csv" }); //$NON-NLS-1$
186186
String fileName = dialog.open();
187-
if (!fileName.isEmpty()) {
188-
ScopeView.this.myScope.saveData(fileName);
187+
if (fileName != null) {
188+
if (!fileName.isEmpty()) {
189+
ScopeView.this.myScope.saveData(fileName);
190+
}
189191
}
190192
this.inDrag = false;
191193
this.inSize = false;

0 commit comments

Comments
 (0)