mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: Takedown of an expired HUD message did not properly detach it from the list.
This commit is contained in:
parent
d1026e4b5b
commit
8447525019
1 changed files with 2 additions and 6 deletions
|
@ -460,6 +460,7 @@ void DBaseStatusBar::OnDestroy ()
|
|||
while (msg)
|
||||
{
|
||||
DHUDMessageBase *next = msg->Next;
|
||||
msg->Next = nullptr;
|
||||
msg->Destroy();
|
||||
msg = next;
|
||||
}
|
||||
|
@ -745,7 +746,6 @@ void DBaseStatusBar::Tick ()
|
|||
for (size_t i = 0; i < countof(Messages); ++i)
|
||||
{
|
||||
DHUDMessageBase *msg = Messages[i];
|
||||
TObjPtr<DHUDMessageBase *>*prev = &Messages[i];
|
||||
|
||||
while (msg)
|
||||
{
|
||||
|
@ -753,13 +753,9 @@ void DBaseStatusBar::Tick ()
|
|||
|
||||
if (msg->CallTick ())
|
||||
{
|
||||
*prev = next;
|
||||
DetachMessage(msg);
|
||||
msg->Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
prev = &msg->Next;
|
||||
}
|
||||
msg = next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue