Fix crash when parsing an empty action list for DECORATE

This commit is contained in:
Randy Heit 2016-02-19 16:31:53 -06:00
parent a31bd78abe
commit 80d49d6bb9

View file

@ -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));