From fbc1028d2b6156a297540d9d4a0030ff0036717d Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 13 Apr 2017 12:06:59 +0300 Subject: [PATCH] Fixed crash when parsing DECORATE constant expressions --- src/scripting/decorate/thingdef_exp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }