mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
Merge branch 'draganddropdead' into 'master'
Don't update displayed armor rating when there's no player pointer (#8211) Closes #8211 See merge request OpenMW/openmw!4430
This commit is contained in:
commit
540eee9c97
@ -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 New Issue
Block a user