mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Safely handle unknown HUD message layers.
SVN r3823 (trunk)
This commit is contained in:
parent
73552f0365
commit
4056f0191a
1 changed files with 6 additions and 0 deletions
|
@ -391,6 +391,12 @@ void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id, int layer)
|
||||||
old->Destroy();
|
old->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Merge unknown layers into the default layer.
|
||||||
|
if ((size_t)layer >= countof(Messages))
|
||||||
|
{
|
||||||
|
layer = HUDMSGLayer_Default;
|
||||||
|
}
|
||||||
|
|
||||||
prev = &Messages[layer];
|
prev = &Messages[layer];
|
||||||
|
|
||||||
// The ID serves as a priority, where lower numbers appear in front of
|
// The ID serves as a priority, where lower numbers appear in front of
|
||||||
|
|
Loading…
Reference in a new issue