From ceb16bb6f8aab59d7651800503b68c41ea798391 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 14 Sep 2019 19:41:34 +0300 Subject: [PATCH] [Client] Reimplement temporary fix from c65d6c1328db57e80c909af2937fd27182c54ea0 The real reason for the crash remains to be fixed. --- apps/openmw/mwworld/containerstore.cpp | 27 ++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwworld/containerstore.cpp b/apps/openmw/mwworld/containerstore.cpp index 5a053f6d8..2750bd347 100644 --- a/apps/openmw/mwworld/containerstore.cpp +++ b/apps/openmw/mwworld/containerstore.cpp @@ -388,8 +388,17 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1); } - if (mListener && !actorPtr.getClass().hasInventoryStore(actorPtr)) - mListener->itemAdded(item, count); + /* + Start of tes3mp change (major) + + Disable the listener here because it keeps causing crashes; this should only be + a temporary solution + */ + //if (mListener && !actorPtr.getClass().hasInventoryStore(actorPtr)) + // mListener->itemAdded(item, count); + /* + End of tes3mp change (major) + */ return it; } @@ -527,8 +536,18 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor flagAsModified(); // we should not fire event for InventoryStore yet - it has some custom logic - if (mListener && !actor.getClass().hasInventoryStore(actor)) - mListener->itemRemoved(item, count - toRemove); + + /* + Start of tes3mp change (major) + + Disable the listener here because it keeps causing crashes; this should only be + a temporary solution + */ + //if (mListener && !actor.getClass().hasInventoryStore(actor)) + // mListener->itemRemoved(item, count - toRemove); + /* + End of tes3mp change (major) + */ // number of removed items return count - toRemove;