diff --git a/apps/openmw/mwgui/itemview.cpp b/apps/openmw/mwgui/itemview.cpp index 89d764c845..ae295cd4ea 100644 --- a/apps/openmw/mwgui/itemview.cpp +++ b/apps/openmw/mwgui/itemview.cpp @@ -82,7 +82,9 @@ namespace MWGui if (Settings::gui().mControllerMenus) { - mControllerFocus = std::clamp(mControllerFocus, 0, mItemCount - 1); + mControllerFocus = -1; + if (mItemCount > 0) + mControllerFocus = std::clamp(mControllerFocus, 0, mItemCount - 1); updateControllerFocus(-1, mControllerFocus); }