mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-20 01:41:27 +00:00
Fixed crash caused by script number collision of ACS typed scripts
Wrong typed script can be picked when the same ACS script number is used for different script types from multiple behavior lumps Although script in particular state is discarded and null pointer could be dereferenced https://forum.zdoom.org/viewtopic.php?t=57718
This commit is contained in:
parent
ca55d8993f
commit
122f5d9515
1 changed files with 1 additions and 1 deletions
|
@ -3439,7 +3439,7 @@ void FBehavior::StartTypedScripts (uint16_t type, AActor *activator, bool always
|
|||
{
|
||||
DLevelScript *runningScript = P_GetScriptGoing (activator, NULL, ptr->Number,
|
||||
ptr, this, &arg1, 1, always ? ACS_ALWAYS : 0);
|
||||
if (runNow)
|
||||
if (nullptr != runningScript && runNow)
|
||||
{
|
||||
runningScript->RunScript ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue