From 80d49d6bb91856020e04ba837c4bb7a0668742e3 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 19 Feb 2016 16:31:53 -0600 Subject: [PATCH] Fix crash when parsing an empty action list for DECORATE --- src/thingdef/thingdef_states.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/thingdef/thingdef_states.cpp b/src/thingdef/thingdef_states.cpp index 5b54d684d3..49febd06e1 100644 --- a/src/thingdef/thingdef_states.cpp +++ b/src/thingdef/thingdef_states.cpp @@ -361,6 +361,10 @@ endofstate: void AddImplicitReturn(FxSequence *code, const PPrototype *proto, FScanner &sc) { + if (code == NULL) + { + return; + } if (proto == NULL || proto->ReturnTypes.Size() == 0) { // Returns nothing. Good. We can safely add an implied return. code->Add(new FxReturnStatement(NULL, sc));