diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index af6f7b52ab..1f704a1a46 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -96,7 +96,7 @@ ExpEmit::ExpEmit(VMFunctionBuilder *build, int type) void ExpEmit::Free(VMFunctionBuilder *build) { - if (!Fixed && !Konst) + if (!Fixed && !Konst && RegType <= REGT_TYPE) { build->Registers[RegType].Return(RegNum, 1); }