mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 17:06:41 +00:00
Don't update displayed armor rating when there's no player pointer (#8211)
This commit is contained in:
parent
1349fdb4f2
commit
636e5ed08b
1 changed files with 3 additions and 0 deletions
|
@ -442,6 +442,9 @@ namespace MWGui
|
||||||
|
|
||||||
void InventoryWindow::updateArmorRating()
|
void InventoryWindow::updateArmorRating()
|
||||||
{
|
{
|
||||||
|
if (mPtr.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
mArmorRating->setCaptionWithReplacing(
|
mArmorRating->setCaptionWithReplacing(
|
||||||
"#{sArmor}: " + MyGUI::utility::toString(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
"#{sArmor}: " + MyGUI::utility::toString(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
||||||
if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)
|
if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)
|
||||||
|
|
Loading…
Reference in a new issue