diff --git a/apps/openmw/mwmp/CellController.cpp b/apps/openmw/mwmp/CellController.cpp index 79450453a..9c066ad20 100644 --- a/apps/openmw/mwmp/CellController.cpp +++ b/apps/openmw/mwmp/CellController.cpp @@ -358,6 +358,8 @@ MWWorld::CellStore *CellController::getCellStore(const ESM::Cell& cell) bool CellController::isSameCell(const ESM::Cell& cell, const ESM::Cell& otherCell) { + if (&cell == nullptr || &otherCell == nullptr) return false; + if (cell.isExterior() && otherCell.isExterior()) { if (cell.mData.mX == otherCell.mData.mX && cell.mData.mY == otherCell.mData.mY) diff --git a/apps/openmw/mwmp/PlayerList.cpp b/apps/openmw/mwmp/PlayerList.cpp index 379e6ad23..a95ef1429 100644 --- a/apps/openmw/mwmp/PlayerList.cpp +++ b/apps/openmw/mwmp/PlayerList.cpp @@ -96,6 +96,9 @@ void PlayerList::enableMarkers(const ESM::Cell& cell) { for (auto &playerEntry : players) { + if (playerEntry.second == nullptr || playerEntry.second->getPtr().mRef == nullptr) + continue; + if (Main::get().getCellController()->isSameCell(cell, playerEntry.second->cell)) { playerEntry.second->enableMarker();