diff options
author | Thierry Crozat | 2013-08-10 23:25:54 +0100 |
---|---|---|
committer | Thierry Crozat | 2013-08-10 23:26:53 +0100 |
commit | f125dce608026b868fa2d705ecd1c15b3e0272ac (patch) | |
tree | 2c7e5ebf4262e5381c94f5e89850b789cd2d0d09 | |
parent | 4b1c0b29ea3e6ab48b5a2fa8101a3a53c8e737ee (diff) | |
download | scummvm-rg350-f125dce608026b868fa2d705ecd1c15b3e0272ac.tar.gz scummvm-rg350-f125dce608026b868fa2d705ecd1c15b3e0272ac.tar.bz2 scummvm-rg350-f125dce608026b868fa2d705ecd1c15b3e0272ac.zip |
GUI: Initialise _hotkey in ButtonWidget constructor
One of the two ButtonWidget constructor did not initialise _hotkey
when given a non-null value. This caused valgrind to report an
access to uninitialised variable in Dialog::handleKeyDown().
-rw-r--r-- | gui/widget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/widget.cpp b/gui/widget.cpp index d97c46a5cc..e96b62e359 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -287,7 +287,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Common::String &label, const char *tooltip, uint32 cmd, uint8 hotkey) : StaticTextWidget(boss, name, cleanupHotkey(label), tooltip), CommandSender(boss), - _cmd(cmd), _lastTime(0) { + _cmd(cmd), _hotkey(hotkey), _lastTime(0) { if (hotkey == 0) _hotkey = parseHotkey(label); setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); |