Fixed: [Issue 1] NPE when resetting perspective.
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
index 261022f..e1da3b4 100644
--- a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
@@ -62,12 +62,13 @@
 
   private static void openTerminalView(String id, IPath workingDirectory) {
     IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+    IPath safeWorkingDirectory = (workingDirectory != null) ? workingDirectory : userHomeDirectory();
     try {
-      String directoryName = workingDirectory.lastSegment();
+      String directoryName = safeWorkingDirectory.lastSegment();
       String secondaryId = (id != null) ? id : directoryName;
       TerminalView view = (TerminalView) page.showView(VIEW_ID, secondaryId, VIEW_ACTIVATE);
       view.setPartName(directoryName);
-      view.open(workingDirectory);
+      view.open(safeWorkingDirectory);
     } catch (PartInitException e) {
       log("Unable to create Terminal View", e);
     }