diff options
author | Adrian Thurston <thurston@colm.net> | 2017-02-27 18:13:14 +0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2017-02-27 18:15:26 +0700 |
commit | 62c96c8c7e9effb529c87640d184358c9fa652f9 (patch) | |
tree | 0610be699ff360b725f393facc23c9e6459f5aa4 | |
parent | d503447cc85fdd11357d26f87f729eee00eb4a3e (diff) | |
download | colm-62c96c8c7e9effb529c87640d184358c9fa652f9.tar.gz |
crash fix in lookup: if lhs has no obj catch the error
-rw-r--r-- | src/lookup.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lookup.cc b/src/lookup.cc index ca44df53..923fac21 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -114,6 +114,8 @@ VarRefLookup LangVarRef::lookupQualification( Compiler *pd, NameScope *rootScope } ObjectDef *searchObjDef = qualUT->objectDef(); + if ( searchObjDef == 0 ) + error(qi->loc) << "left hand side of qual has no object defintion" << endp; searchScope = searchObjDef->rootScope; } |