From f0964108c30fa7754399da5177b220796613345f Mon Sep 17 00:00:00 2001 From: Carlos Pessoa Date: Mon, 19 Dec 2022 12:34:09 -0300 Subject: [PATCH] fx --- src/creatures/players/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index f6f37b486a7..d8913cd78cb 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -3849,8 +3849,10 @@ void Player::postAddNotification(Thing* thing, const Cylinder* oldParent, int32_ for (const auto& it : openContainers) { Container* container = it.second.container; - if (!Position::areInRange<1, 1, 0>(container->getPosition(), getPosition())) { - containers.push_back(container); + if(container != nullptr){ + if (!Position::areInRange<1, 1, 0>(container->getPosition(), getPosition())) { + containers.push_back(container); + } } }