diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-24 12:07:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-24 12:07:34 +0300 |
commit | 9c36b0237767cc42bfc74d77935f229f139a6663 (patch) | |
tree | 67adb5454292ede354acca08a87e3935704e3548 /src/gui/windows/setupwindow.cpp | |
parent | cc965406e7903e890fc0c797c2684efc5c4624a6 (diff) | |
download | manaverse-9c36b0237767cc42bfc74d77935f229f139a6663.tar.gz manaverse-9c36b0237767cc42bfc74d77935f229f139a6663.tar.bz2 manaverse-9c36b0237767cc42bfc74d77935f229f139a6663.tar.xz manaverse-9c36b0237767cc42bfc74d77935f229f139a6663.zip |
Fix possible crash in "reset windows".
Diffstat (limited to 'src/gui/windows/setupwindow.cpp')
-rw-r--r-- | src/gui/windows/setupwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp index 7239061ff..93556ab08 100644 --- a/src/gui/windows/setupwindow.cpp +++ b/src/gui/windows/setupwindow.cpp @@ -243,6 +243,18 @@ void SetupWindow::registerWindowForReset(Window *const window) mWindowsToReset.push_back(window); } +void SetupWindow::unregisterWindowForReset(Window *const window) +{ + FOR_EACH (std::list<Window*>::const_iterator, it, mWindowsToReset) + { + if (*it == window) + { + mWindowsToReset.erase(it); + return; + } + } +} + void SetupWindow::doCancel() { setVisible(false); |