### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.ui Index: UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java,v retrieving revision 1.20 diff -u -r1.20 SystemTableViewPart.java --- UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java 23 Jul 2007 19:20:55 -0000 1.20 +++ UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java 26 Jul 2007 14:47:22 -0000 @@ -21,6 +21,7 @@ * Xuan Chen (IBM) - [192716] Refresh Error in Table View after Renaming folder shown in table * Xuan Chen (IBM) - [194838] Move the code for comparing two objects by absolute name to a common location * Kevin Doyle (IBM) - [193394] After Deleting the folder shown in Table get an error + * Kevin Doyle (IBM) - [197971] NPE when table has no input and doing commands in Systems View ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -1590,23 +1591,25 @@ } } - Object currentObject = _currentItem.getObject(); + if (_currentItem != null) { + Object currentObject = _currentItem.getObject(); - // Update the input of the viewer to the closest item in the history - // that still exists if the current viewer item has been deleted. - if (c == currentObject || c.equals(currentObject) || isParentOf(c,currentObject)) - { - if (_browseHistory.size() > 0) - { - _currentItem = (HistoryItem)_browseHistory.get(_browsePosition); - setInput(_currentItem.getObject(), null, false); - } - else - { - _currentItem = null; - setInput(RSECorePlugin.getTheSystemRegistry(), null, true); - } - } + // Update the input of the viewer to the closest item in the history + // that still exists if the current viewer item has been deleted. + if (c == currentObject || c.equals(currentObject) || isParentOf(c,currentObject)) + { + if (_browseHistory.size() > 0) + { + _currentItem = (HistoryItem)_browseHistory.get(_browsePosition); + setInput(_currentItem.getObject(), null, false); + } + else + { + _currentItem = null; + setInput(RSECorePlugin.getTheSystemRegistry(), null, true); + } + } + } } protected boolean isParentOf(Object parent, Object child) {