- fixed: Completely empty if statements left the code generator in a broken state.

This commit is contained in:
Christoph Oelckers 2016-11-19 18:02:07 +01:00
parent 0b70df88d8
commit 7595343aaa

View file

@ -7946,7 +7946,8 @@ FxExpression *FxIfStatement::Resolve(FCompileContext &ctx)
if (WhenTrue == nullptr && WhenFalse == nullptr)
{ // We don't do anything either way, so disappear
delete this;
return nullptr;
ScriptPosition.Message(MSG_WARNING, "empty if statement");
return new FxNop(ScriptPosition);
}
SAFE_RESOLVE(Condition, ctx);