diff --git a/src/scripting/decorate/thingdef_exp.cpp b/src/scripting/decorate/thingdef_exp.cpp index d3acae632..37d613d8a 100644 --- a/src/scripting/decorate/thingdef_exp.cpp +++ b/src/scripting/decorate/thingdef_exp.cpp @@ -88,7 +88,8 @@ FxExpression *ParseExpression (FScanner &sc, PClassActor *cls, PNamespace *spc) if (spc) { - FCompileContext ctx(spc, cls->VMType, true); + PClassType *vmtype = nullptr == cls ? nullptr : cls->VMType; + FCompileContext ctx(spc, vmtype, true); data = data->Resolve(ctx); }