- handle the case where SBARINFO only contains a mugshot definition and fall back to the current statusbarclass if creating an SBARINFO-based statusbar fails.
This commit is contained in:
parent
e27e89b57d
commit
be2cfddb17
2 changed files with 10 additions and 2 deletions
|
|
@ -303,6 +303,15 @@ void ST_CreateStatusBar(bool bTitleLevel)
|
|||
{
|
||||
StatusBar = CreateCustomStatusBar(SCRIPT_DEFAULT);
|
||||
}
|
||||
// SBARINFO failed so try the current statusbarclass again.
|
||||
if (StatusBar == nullptr)
|
||||
{
|
||||
auto cls = PClass::FindClass(gameinfo.statusbarclass);
|
||||
if (cls != nullptr)
|
||||
{
|
||||
StatusBar = (DBaseStatusBar *)cls->CreateNew();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StatusBar == nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue