From 43c9fd4cec3e9c060ca524a048bf63ba8f0f1021 Mon Sep 17 00:00:00 2001 From: Finbar Crago Date: Tue, 26 Jun 2018 13:41:53 +1000 Subject: [PATCH] check MWWorld::Ptr != NULL for MWGui ItemPtr tooltips --- apps/openmw/mwgui/tooltips.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index b2991a034..20814aac5 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -191,6 +191,9 @@ namespace MWGui else if (type == "ItemPtr") { mFocusObject = *focus->getUserData(); + if (!mFocusObject) + return; + tooltipSize = getToolTipViaPtr(mFocusObject.getRefData().getCount(), false, checkOwned()); } else if (type == "ItemModelIndex")