[Scummvm-git-logs] scummvm branch-2-8 -> 3df504adedba0ce7281a0ecfb345d3e5c632f5f3
sev-
noreply at scummvm.org
Tue Dec 12 13:30:14 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3df504aded GUI: Fix crash when adding a game in some circumstances
Commit: 3df504adedba0ce7281a0ecfb345d3e5c632f5f3
https://github.com/scummvm/scummvm/commit/3df504adedba0ce7281a0ecfb345d3e5c632f5f3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-12-12T14:30:04+01:00
Commit Message:
GUI: Fix crash when adding a game in some circumstances
Changed paths:
gui/widgets/groupedlist.cpp
diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp
index e3ff7b58e0f..4248ec8f5b4 100644
--- a/gui/widgets/groupedlist.cpp
+++ b/gui/widgets/groupedlist.cpp
@@ -210,7 +210,7 @@ void GroupedListWidget::setSelected(int item) {
return;
// We only have to do something if the widget is enabled and the selection actually changes
- if (isEnabled() && (_selectedItem == -1 || _listIndex[_selectedItem] != item)) {
+ if (isEnabled() && (_selectedItem == -1 || _selectedItem >= (int)_list.size() || _listIndex[_selectedItem] != item)) {
if (_editMode)
abortEditMode();
More information about the Scummvm-git-logs
mailing list