diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 880dc232b..013ac0d8b 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -798,6 +798,12 @@ void LocalPlayer::setCell() MWWorld::Ptr player = world->getPlayerPtr(); ESM::Position pos; + // To avoid crashes, close any container menus this player may be in + if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Container)) + { + MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Container); + } + world->getPlayer().setTeleported(true); int x = cell.mData.mX;