Fixed: the game could crash while parsing expressions in some places

This commit is contained in:
Leonard2 2016-08-04 19:45:24 +02:00 committed by Christoph Oelckers
commit 4a859393fe
2 changed files with 5 additions and 1 deletions

View file

@ -4410,6 +4410,8 @@ ExpEmit FxClassTypeCast::Emit(VMFunctionBuilder *build)
FxExpression *FxStateByIndex::Resolve(FCompileContext &ctx)
{
CHECKRESOLVED();
ABORT(ctx.Class);
if (ctx.Class->NumOwnedStates == 0)
{
// This can't really happen
@ -4464,6 +4466,8 @@ FxMultiNameState::FxMultiNameState(const char *_statestring, const FScriptPositi
FxExpression *FxMultiNameState::Resolve(FCompileContext &ctx)
{
CHECKRESOLVED();
ABORT(ctx.Class);
if (names[0] == NAME_None)
{
scope = NULL;