Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2002-08-29 16:06:10 +0000
committerDani Megert2002-08-29 16:06:10 +0000
commit719ce0be3ac12461e4a2385cb23cc3f5c0e9bc81 (patch)
tree38bbbec7a77e9e2e192b41e34e707c09866e8319
parent6a84738535851d2e857bf176ba0dfd0e434d5bbe (diff)
downloadeclipse.platform.text-719ce0be3ac12461e4a2385cb23cc3f5c0e9bc81.tar.gz
eclipse.platform.text-719ce0be3ac12461e4a2385cb23cc3f5c0e9bc81.tar.xz
eclipse.platform.text-719ce0be3ac12461e4a2385cb23cc3f5c0e9bc81.zip
Added check against null-marker
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
index de0c4a03b..ef89b8a8b 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchResultViewer.java
@@ -5,6 +5,7 @@
package org.eclipse.search.internal.ui;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.SWT;
@@ -310,8 +311,10 @@ public class SearchResultViewer extends TableViewer {
ISelection selection= getSelection();
if (selection instanceof IStructuredSelection) {
Object entry= ((IStructuredSelection)selection).getFirstElement();
- return (entry instanceof ISearchResultViewEntry) &&
- ((ISearchResultViewEntry)entry).getSelectedMarker().getAttribute(SearchUI.POTENTIAL_MATCH, false);
+ if (entry instanceof ISearchResultViewEntry) {
+ IMarker marker= ((ISearchResultViewEntry)entry).getSelectedMarker();
+ return marker != null && marker.getAttribute(SearchUI.POTENTIAL_MATCH, false);
+ }
}
return false;
}

Back to the top