Skip to content
Permalink
Browse files

- fixed: Takedown of an expired HUD message did not properly detach i…

…t from the list.
  • Loading branch information...
coelckers committed Aug 9, 2019
1 parent d1026e4 commit 84475250192dd4274c5a09e35047db6ac21a3c04
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/g_statusbar/shared_sbar.cpp
@@ -460,6 +460,7 @@ void DBaseStatusBar::OnDestroy ()
while (msg)
{
DHUDMessageBase *next = msg->Next;
msg->Next = nullptr;
msg->Destroy();
msg = next;
}
@@ -745,21 +746,16 @@ void DBaseStatusBar::Tick ()
for (size_t i = 0; i < countof(Messages); ++i)
{
DHUDMessageBase *msg = Messages[i];
TObjPtr<DHUDMessageBase *>*prev = &Messages[i];

while (msg)
{
DHUDMessageBase *next = msg->Next;

if (msg->CallTick ())
{
*prev = next;
DetachMessage(msg);
msg->Destroy();
}
else
{
prev = &msg->Next;
}
msg = next;
}

0 comments on commit 8447525

Please sign in to comment.
You can’t perform that action at this time.