From b68f311b53a4331503efbb7de503c2e3ed806af6 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Wed, 21 Aug 2013 08:52:29 -0400 Subject: [PATCH] [lttng] fix for NPE when creating a tracing session (bug 415571) Change-Id: I1676c120680a3afb9b9952f6990c0663a76be1d4 Signed-off-by: Bernd Hufmann Reviewed-on: https://git.eclipse.org/r/15700 Tested-by: Hudson CI Reviewed-by: Matthew Khouzam IP-Clean: Matthew Khouzam Tested-by: Matthew Khouzam --- .../ui/views/control/dialogs/CreateSessionDialog.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java index fe07098566..f6c1845f32 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/dialogs/CreateSessionDialog.java @@ -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, -- 2.34.1