- fixed crash when defining a global constant which references a class member constant in its value.

This commit is contained in:
Christoph Oelckers 2017-09-02 08:14:50 +02:00
parent 12ad7ee933
commit eade38fb09

View file

@ -202,7 +202,7 @@ FxLocalVariableDeclaration *FCompileContext::FindLocalVariable(FName name)
static PContainerType *FindContainerType(FName name, FCompileContext &ctx)
{
auto sym = ctx.Class->Symbols.FindSymbol(name, true);
auto sym = ctx.Class != nullptr? ctx.Class->Symbols.FindSymbol(name, true) : nullptr;
if (sym == nullptr) sym = ctx.CurGlobals->Symbols.FindSymbol(name, true);
if (sym && sym->IsKindOf(RUNTIME_CLASS(PSymbolType)))
{