aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2002-09-09 20:28:48 +0000
committerMax Horn2002-09-09 20:28:48 +0000
commit395b98a3e207ba14ac23f4bf679b65fa5f8fca21 (patch)
treeefa167de15924c7f3aa4a07f053af446c6b2e4f0 /gui
parent22e2df20c2aeb78c9b7bac513aa0d45e75faa433 (diff)
downloadscummvm-rg350-395b98a3e207ba14ac23f4bf679b65fa5f8fca21.tar.gz
scummvm-rg350-395b98a3e207ba14ac23f4bf679b65fa5f8fca21.tar.bz2
scummvm-rg350-395b98a3e207ba14ac23f4bf679b65fa5f8fca21.zip
fixed a crasher when re-opening the save/load dialog
svn-id: r4919
Diffstat (limited to 'gui')
-rw-r--r--gui/ListWidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index b3b6e0c977..1f607bfbfc 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -252,10 +252,11 @@ void ListWidget::scrollToCurrent() {
} else if (_selectedItem >= _currentPos + _entriesPerPage ) {
// it's below our view
_currentPos = _selectedItem - _entriesPerPage + 1;
- if (_currentPos < 0)
- _currentPos = 0;
}
+ if (_currentPos < 0)
+ _currentPos = 0;
+
_scrollBar->_currentPos = _currentPos;
_scrollBar->recalc();
}