diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 23eb499de..1841303f2 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -158,7 +158,9 @@ namespace MWGui getWidget(mCrosshair, "Crosshair"); - LocalMapBase::init(mMinimap, mCompass, Settings::Manager::getInt("local map hud widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map")); + int mapSize = std::max(1, Settings::Manager::getInt("local map hud widget size", "Map")); + int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map")); + LocalMapBase::init(mMinimap, mCompass, mapSize, cellDistance); mMainWidget->eventMouseButtonClick += MyGUI::newDelegate(this, &HUD::onWorldClicked); mMainWidget->eventMouseMove += MyGUI::newDelegate(this, &HUD::onWorldMouseOver); diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index d3c1ec292..c1ff9510d 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -679,7 +679,9 @@ namespace MWGui mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart); mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked); - LocalMapBase::init(mLocalMap, mPlayerArrowLocal, Settings::Manager::getInt("local map widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map")); + int mapSize = std::max(1, Settings::Manager::getInt("local map widget size", "Map")); + int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map")); + LocalMapBase::init(mLocalMap, mPlayerArrowLocal, mapSize, cellDistance); mGlobalMap->setVisible(mGlobal); mLocalMap->setVisible(!mGlobal);