mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-23 20:42:24 +00:00
Fixed: the game could crash while parsing expressions in some places
This commit is contained in:
parent
9229146eeb
commit
4a859393fe
2 changed files with 5 additions and 1 deletions
|
@ -392,7 +392,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
|
|||
return ParseAtan2(sc, identifier, cls);
|
||||
default:
|
||||
args = new FArgumentList;
|
||||
func = dyn_cast<PFunction>(cls->Symbols.FindSymbol(identifier, true));
|
||||
func = (cls == nullptr) ? nullptr : dyn_cast<PFunction>(cls->Symbols.FindSymbol(identifier, true));
|
||||
try
|
||||
{
|
||||
// There is an action function ACS_NamedExecuteWithResult which must be ignored here for this to work.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue