Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-02-27 16:22:00 +0000
committerPawel Piech2012-02-27 16:22:00 +0000
commit9d5cb2fc195dcf9711499f5e3782dd6e0e3da3e4 (patch)
tree820e6b4982ea7b1fd74eda3ee1262ecbea3a6135
parent66a74d0b50b4af73fcf61a2946c936b39f44cad0 (diff)
downloadeclipse.platform.debug-9d5cb2fc195dcf9711499f5e3782dd6e0e3da3e4.tar.gz
eclipse.platform.debug-9d5cb2fc195dcf9711499f5e3782dd6e0e3da3e4.tar.xz
eclipse.platform.debug-9d5cb2fc195dcf9711499f5e3782dd6e0e3da3e4.zip
Bug 372619 - 10 test failures in official build
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
index a093c2beb..cdfecec33 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
@@ -560,19 +560,20 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
public VirtualItem findItem(TreePath path) {
- VirtualItem item = fTree;
if (path.getSegmentCount() == 0) {
return fTree;
}
List itemsList = (List)fItemsMap.get(path.getLastSegment());
- for (int i = 0; i < itemsList.size(); i++) {
- if ( path.equals(getTreePathFromItem((VirtualItem)itemsList.get(i))) ) {
- return (VirtualItem)itemsList.get(i);
- }
+ if (itemsList != null) {
+ for (int i = 0; i < itemsList.size(); i++) {
+ if ( path.equals(getTreePathFromItem((VirtualItem)itemsList.get(i))) ) {
+ return (VirtualItem)itemsList.get(i);
+ }
+ }
}
- return item;
+ return null;
}
static private final VirtualItem[] EMPTY_ITEMS_ARRAY = new VirtualItem[0];

Back to the top