Fix crash when pausing during grand prix

This commit is contained in:
Benau 2021-05-22 11:50:34 +08:00
parent 8124079d6c
commit 2f98a011d4

View File

@ -131,6 +131,7 @@ RacePausedDialog::RacePausedDialog(const float percentWidth,
if (!NetworkConfig::get()->isNetworking())
{
getWidget<IconButtonWidget>("newrace")->setLabel(_("Setup New Game"));
if (getWidget<IconButtonWidget>("restart"))
getWidget<IconButtonWidget>("restart")->setLabel(_("Restart Battle"));
}
getWidget<IconButtonWidget>("exit")->setLabel(_("Exit Battle"));
@ -141,6 +142,7 @@ RacePausedDialog::RacePausedDialog(const float percentWidth,
if (!NetworkConfig::get()->isNetworking())
{
getWidget<IconButtonWidget>("newrace")->setLabel(_("Setup New Race"));
if (getWidget<IconButtonWidget>("restart"))
getWidget<IconButtonWidget>("restart")->setLabel(_("Restart Race"));
}
getWidget<IconButtonWidget>("exit")->setLabel(_("Exit Race"));