diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 4972e1344..b4a97c3cf 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -69,7 +69,7 @@ static FString GetStringConst(FxExpression *ex, FCompileContext &ctx) { ex = new FxStringCast(ex); ex = ex->Resolve(ctx); - return static_cast(ex)->GetValue().GetString(); + return ex ? static_cast(ex)->GetValue().GetString() : FString(); } int ZCCCompiler::IntConstFromNode(ZCC_TreeNode *node, PStruct *cls)