mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-14 03:35:37 +02:00
fix NPEs
This commit is contained in:
parent
274efaabb9
commit
5e2403f3f3
2 changed files with 2 additions and 2 deletions
|
@ -195,7 +195,7 @@ public class CPPClassScope extends CPPScope implements ICPPClassScope {
|
|||
if( CharArrayUtils.equals( n, compType.getName().toCharArray() ) ){
|
||||
return (IBinding[]) ArrayUtil.addAll( IBinding.class, null, getConstructors() );
|
||||
}
|
||||
if( bindings.containsKey( n ) ){
|
||||
if( bindings != null && bindings.containsKey( n ) ){
|
||||
Object o = bindings.get( n );
|
||||
if( o instanceof IBinding[] )
|
||||
return (IBinding[]) ArrayUtil.trim( IBinding.class, (Object[]) o );
|
||||
|
|
|
@ -97,7 +97,7 @@ public class CPPNamespaceScope extends CPPScope implements ICPPNamespaceScope{
|
|||
*/
|
||||
public IBinding[] find(String name) {
|
||||
char [] n = name.toCharArray();
|
||||
if( bindings.isFullyResolved( n ) ){
|
||||
if( bindings != null && bindings.isFullyResolved( n ) ){
|
||||
Object o = bindings.get( n );
|
||||
if( o instanceof IBinding[] )
|
||||
return (IBinding[]) ArrayUtil.trim( IBinding.class, (Object[]) o );
|
||||
|
|
Loading…
Add table
Reference in a new issue