From: Bernd Hufmann Date: Wed, 25 Feb 2015 20:29:22 +0000 (-0500) Subject: Fix NullPointerException during RCP startup X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8d96cb20f105b7ccf3b296dcb03d26612bc7cb1f;p=deliverable%2Ftracecompass.git Fix NullPointerException during RCP startup Change-Id: I49c7b490593088add311d073633e8ce6c943100a Signed-off-by: Bernd Hufmann Reviewed-on: https://git.eclipse.org/r/42692 Reviewed-by: Hudson CI Reviewed-by: Alexandre Montplaisir Tested-by: Alexandre Montplaisir --- diff --git a/org.eclipse.tracecompass.rcp.ui/src/org/eclipse/tracecompass/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java b/org.eclipse.tracecompass.rcp.ui/src/org/eclipse/tracecompass/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java index fa6922096b..2516a02669 100644 --- a/org.eclipse.tracecompass.rcp.ui/src/org/eclipse/tracecompass/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java +++ b/org.eclipse.tracecompass.rcp.ui/src/org/eclipse/tracecompass/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java @@ -110,7 +110,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { 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$ }