From d242f3790fe00a717a5c84f8e84a292b3b1ae92c Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 4 Apr 2017 07:21:02 +0300 Subject: [PATCH] [Server] Don't try to send late-arriving container packets about now unloaded cells --- apps/openmw-mp/processors/world/ProcessorContainer.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/processors/world/ProcessorContainer.hpp b/apps/openmw-mp/processors/world/ProcessorContainer.hpp index eb56fb80b..47993df2f 100644 --- a/apps/openmw-mp/processors/world/ProcessorContainer.hpp +++ b/apps/openmw-mp/processors/world/ProcessorContainer.hpp @@ -25,7 +25,12 @@ namespace mwmp // than one container (i.e. replies to server requests for container contents) // only to players who have the container's cell loaded if (event.action == BaseEvent::SET && event.objectChanges.count > 1) - CellController::get()->getCell(&event.cell)->sendToLoaded(&packet, &event); + { + Cell *serverCell = CellController::get()->getCell(&event.cell); + + if (serverCell != nullptr) + serverCell->sendToLoaded(&packet, &event); + } else packet.Send(true);