mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Bug 516046 - NPE in AbstractDebugTextHover when hovering over undefined macro
Change-Id: If732a826801f025e929f711fa35a793545d0ed73 Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
parent
a561d301ca
commit
7999eab841
1 changed files with 3 additions and 0 deletions
|
@ -249,6 +249,9 @@ public abstract class AbstractDebugTextHover implements ICEditorTextHover, IText
|
||||||
IASTName name= ast.getNodeSelector(null).findEnclosingName(offset, length);
|
IASTName name= ast.getNodeSelector(null).findEnclosingName(offset, length);
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
IASTImageLocation imageLoc = name.getImageLocation();
|
IASTImageLocation imageLoc = name.getImageLocation();
|
||||||
|
if (imageLoc == null) {
|
||||||
|
return Status.CANCEL_STATUS;
|
||||||
|
}
|
||||||
int kind = imageLoc.getLocationKind();
|
int kind = imageLoc.getLocationKind();
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case IASTImageLocation.ARGUMENT_TO_MACRO_EXPANSION:
|
case IASTImageLocation.ARGUMENT_TO_MACRO_EXPANSION:
|
||||||
|
|
Loading…
Add table
Reference in a new issue