From 04a202534085186d93911c7195489e79c384e596 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 5 Jun 2018 18:09:10 +0300 Subject: [PATCH 1/2] Fix crash when adding items to certain disabled creatures (bug #4441) --- apps/openmw/mwrender/objects.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index f0a3d2e38..db6772eaa 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -123,11 +123,12 @@ bool Objects::removeObject (const MWWorld::Ptr& ptr) mObjects.erase(iter); - if (ptr.getClass().isNpc()) + if (ptr.getClass().isActor()) { - MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr); - store.setInvListener(NULL, ptr); - store.setContListener(NULL); + if (ptr.getClass().hasInventoryStore(ptr)) + ptr.getClass().getInventoryStore(ptr).setInvListener(NULL, ptr); + + ptr.getClass().getContainerStore(ptr).setContListener(NULL); } ptr.getRefData().getBaseNode()->getParent(0)->removeChild(ptr.getRefData().getBaseNode()); From 98063c5afcd4b967dd66b83f1fb1c37288c95031 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Wed, 6 Jun 2018 09:50:33 +0200 Subject: [PATCH 2/2] updated changelog with last-minute crash-bug fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c0f3ef3..7a958fbc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,7 @@ Bug #4413: Moving with 0 strength uses all of your fatigue Bug #4420: Camera flickering when I open up and close menus while sneaking Bug #4435: Item health is considered a signed integer + Bug #4441: Adding items to currently disabled weapon-wielding creatures crashes the game Feature #1786: Round up encumbrance value in the encumbrance bar Feature #2694: Editor: rename "model" column to make its purpose clear Feature #3870: Editor: Terrain Texture Brush Button