Skip to content

Commit

Permalink
Merge branch 'draganddropdead' into 'master'
Browse files Browse the repository at this point in the history
Don't update displayed armor rating when there's no player pointer (#8211)

Closes #8211

See merge request OpenMW/openmw!4430
  • Loading branch information
jvoisin committed Oct 30, 2024
2 parents 4c11dcd + 636e5ed commit 540eee9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/openmw/mwgui/inventorywindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ namespace MWGui

void InventoryWindow::updateArmorRating()
{
if (mPtr.isEmpty())
return;

mArmorRating->setCaptionWithReplacing(
"#{sArmor}: " + MyGUI::utility::toString(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)
Expand Down

0 comments on commit 540eee9

Please sign in to comment.