From dab09180ae2b3971d667f5ae92233592a8c9e19d Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Mon, 20 Apr 2020 22:09:09 +0300 Subject: [PATCH] Make sure non-carriable light sources can't be picked up --- apps/openmw/mwgui/inventorywindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 6041838f5..d11ee4f0c 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -732,7 +732,8 @@ namespace MWGui && (type != typeid(ESM::Potion).name())) return; - if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up + // An object that can be picked up must have a tooltip. + if (!object.getClass().hasToolTip(object)) return; int count = object.getRefData().getCount();