[lttng] fix for NPE when creating a tracing session (bug 415571)
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Wed, 21 Aug 2013 12:52:29 +0000 (08:52 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Thu, 22 Aug 2013 11:47:34 +0000 (07:47 -0400)
Change-Id: I1676c120680a3afb9b9952f6990c0663a76be1d4
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/15700
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java

index fe070985666b8ade36c6d5a91e5bd0403de904aa..f6c1845f322be3a11a310c85e40045fcbe23a83b 100644 (file)
@@ -611,6 +611,14 @@ public class CreateSessionDialog extends Dialog implements ICreateSessionDialog
                 if (fsss != null) {
                     try {
                         IRemoteFile remoteFolder = fsss.getRemoteFileObject(fSessionPath, new NullProgressMonitor());
+
+                        if (remoteFolder == null) {
+                            MessageDialog.openError(getShell(),
+                                    Messages.TraceControl_CreateSessionDialogTitle,
+                                    Messages.TraceControl_InvalidSessionPathError + " (" + fSessionPath + ") \n");  //$NON-NLS-1$ //$NON-NLS-2$
+                            return;
+                        }
+
                         if (remoteFolder.exists()) {
                             MessageDialog.openError(getShell(),
                                     Messages.TraceControl_CreateSessionDialogTitle,
This page took 0.024898 seconds and 5 git commands to generate.