From 9044ac9503bed6cc6ae3da83302ea85d799cb12a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 7 Jan 2015 22:31:48 -0600 Subject: [PATCH] Don't free non-registers. - Fixed: ExpEmit::Free() would try to free REGT_NIL registers, which don't really exist --- src/thingdef/thingdef_expression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }