From 636e5ed08bc2276c4a7afc41b24299f7015a7e8e Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Tue, 29 Oct 2024 10:44:23 +0300 Subject: [PATCH] Don't update displayed armor rating when there's no player pointer (#8211) --- apps/openmw/mwgui/inventorywindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index e2072e229f..a773b4635b 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -442,6 +442,9 @@ namespace MWGui void InventoryWindow::updateArmorRating() { + if (mPtr.isEmpty()) + return; + mArmorRating->setCaptionWithReplacing( "#{sArmor}: " + MyGUI::utility::toString(static_cast(mPtr.getClass().getArmorRating(mPtr)))); if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)