mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-10 16:56:40 +00:00
Merge branch 'noitemview' into 'master'
Fix UB in item view controller refocusing during redraw Closes #8724 See merge request OpenMW/openmw!4948
This commit is contained in:
commit
081cf2cf25
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue