Change-Id: I49c7b490593088add311d073633e8ce6c943100a
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/42692
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
String traceToOpen = TracingRcpPlugin.getDefault().getCli().getArgument(CliParser.OPEN_FILE_LOCATION);
String userHome = System.getProperty("user.home"); //$NON-NLS-1$
// In case the application was not started on the shell, expand ~ to home directory
- if (traceToOpen.startsWith("~/") && userHome != null) { //$NON-NLS-1$
+ if ((traceToOpen != null) && traceToOpen.startsWith("~/") && (userHome != null)) { //$NON-NLS-1$
traceToOpen = traceToOpen.replaceFirst("^~", userHome); //$NON-NLS-1$
}