aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorThierry Crozat2016-10-22 21:02:03 +0100
committerThierry Crozat2016-10-22 21:32:16 +0100
commit9f94294d80e904a7d7af51bdf8fe8fb9456b6832 (patch)
tree8e9bf8ce05910a6b0449ba61413940c1dfc08c0c /gui
parent307321ec20befe32cd254497f62b6ab0dcbcaf83 (diff)
downloadscummvm-rg350-9f94294d80e904a7d7af51bdf8fe8fb9456b6832.tar.gz
scummvm-rg350-9f94294d80e904a7d7af51bdf8fe8fb9456b6832.tar.bz2
scummvm-rg350-9f94294d80e904a7d7af51bdf8fe8fb9456b6832.zip
GUI: Fix incorrect initialisation of some tab Ids in OptionsDialog
A value of 0 is valid for tab ids, so the correct initialisation at this stage is -1. However only one constructor properly initialized all the tab ids to -1 in its initialisation list, but it was then changed to 0 in init(). I have added the missing ones to the other constructors and removed the incorrect ones in init(). But maybe all tab ids should be initialised in init() rather than in the constructors initialisation lists.
Diffstat (limited to 'gui')
-rw-r--r--gui/options.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index 4ebb60b18d..3701369316 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -122,7 +122,7 @@ OptionsDialog::OptionsDialog(const Common::String &domain, int x, int y, int w,
}
OptionsDialog::OptionsDialog(const Common::String &domain, const Common::String &name)
- : Dialog(name), _domain(domain), _graphicsTabId(-1), _tabWidget(0) {
+ : Dialog(name), _domain(domain), _graphicsTabId(-1), _midiTabId(-1), _pathsTabId(-1), _tabWidget(0) {
init();
}
@@ -140,7 +140,6 @@ void OptionsDialog::init() {
_filteringCheckbox = 0;
_aspectCheckbox = 0;
_enableAudioSettings = false;
- _midiTabId = 0;
_midiPopUp = 0;
_midiPopUpDesc = 0;
_oplPopUp = 0;
@@ -183,7 +182,6 @@ void OptionsDialog::init() {
_subSpeedSlider = 0;
_subSpeedLabel = 0;
- _pathsTabId = 0;
_oldTheme = g_gui.theme()->getThemeId();
// Retrieve game GUI options