Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2018-09-22 04:43:27 +0000
committerMarc-André Laperle2018-11-14 02:20:13 +0000
commit7999eab8410d64c126dd892672e1831959f7e928 (patch)
tree3abe45eafa057f046268b276cd836d4d7e7ca386
parenta561d301ca4b2b2e1e40297a2510e03536461b75 (diff)
downloadorg.eclipse.cdt-7999eab8410d64c126dd892672e1831959f7e928.tar.gz
org.eclipse.cdt-7999eab8410d64c126dd892672e1831959f7e928.tar.xz
org.eclipse.cdt-7999eab8410d64c126dd892672e1831959f7e928.zip
Bug 516046 - NPE in AbstractDebugTextHover when hovering over undefined macro
Change-Id: If732a826801f025e929f711fa35a793545d0ed73 Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
index 9366ef75148..73e3aa01e61 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/editors/AbstractDebugTextHover.java
@@ -249,6 +249,9 @@ public abstract class AbstractDebugTextHover implements ICEditorTextHover, IText
IASTName name= ast.getNodeSelector(null).findEnclosingName(offset, length);
if (name != null) {
IASTImageLocation imageLoc = name.getImageLocation();
+ if (imageLoc == null) {
+ return Status.CANCEL_STATUS;
+ }
int kind = imageLoc.getLocationKind();
switch (kind) {
case IASTImageLocation.ARGUMENT_TO_MACRO_EXPANSION:

Back to the top