mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-31 12:13:16 +00:00
P_SwitchWeather: Fix potential infinite loop if non-NullPrecipThinker thinker existed in THINK_PRECIP
This commit is contained in:
parent
9eab5317f3
commit
c76fc45de9
1 changed files with 2 additions and 2 deletions
|
|
@ -1838,12 +1838,12 @@ void P_SwitchWeather(preciptype_t newWeather)
|
|||
|
||||
for (think = thlist[THINK_PRECIP].next; think != &thlist[THINK_PRECIP]; think = next)
|
||||
{
|
||||
next = think->next;
|
||||
|
||||
if (think->function.acp1 != (actionf_p1)P_NullPrecipThinker)
|
||||
continue; // not a precipmobj thinker
|
||||
|
||||
precipmobj = (precipmobj_t *)think;
|
||||
|
||||
next = think->next;
|
||||
P_FreePrecipMobj(precipmobj);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue