mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix bug 102732 : NPE in CPPSemantics.getLookupScope modified from Devin's patch
This commit is contained in:
parent
a638aed7e5
commit
e91a9f5de5
1 changed files with 6 additions and 1 deletions
|
@ -958,8 +958,10 @@ public class CPPSemantics {
|
|||
ICPPScope scope = null;
|
||||
if( start instanceof ICPPScope )
|
||||
scope = (ICPPScope) start;
|
||||
else
|
||||
else if( start instanceof IASTName )
|
||||
scope = getLookupScope( (IASTName) start );
|
||||
else
|
||||
return;
|
||||
|
||||
boolean friendInLocalClass = false;
|
||||
if( scope instanceof ICPPClassScope && data.forFriendship() ){
|
||||
|
@ -3091,6 +3093,9 @@ public class CPPSemantics {
|
|||
} catch (DOMException e1) {
|
||||
return null;
|
||||
}
|
||||
if( scope == null )
|
||||
return null;
|
||||
|
||||
CPPASTName astName = new CPPASTName();
|
||||
astName.setParent( exp );
|
||||
astName.setPropertyInParent( STRING_LOOKUP_PROPERTY );
|
||||
|
|
Loading…
Add table
Reference in a new issue