diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-27 18:53:39 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-27 18:53:39 +0000 |
commit | 10f77f010f8831368ab359074f6e0640961f3818 (patch) | |
tree | b37e21fedc9c745dd11ec42d47bfe315c73f03e9 | |
parent | b4c187739022b9c2cec149c00f6291bde982b567 (diff) | |
download | mana-10f77f010f8831368ab359074f6e0640961f3818.tar.gz mana-10f77f010f8831368ab359074f6e0640961f3818.tar.bz2 mana-10f77f010f8831368ab359074f6e0640961f3818.tar.xz mana-10f77f010f8831368ab359074f6e0640961f3818.zip |
Bail out early if there's no window container.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/gui/window.cpp | 11 |
2 files changed, 10 insertions, 10 deletions
@@ -1,9 +1,10 @@ 2005-08-27 Björn Steinbrink <B.Steinbrink@gmx.de> - * src/engine.cpp, src/game.cpp, src/gui/stats.cpp, src/gui/stats.h, - src/gui/status.cpp, src/gui/status.h: Update the stats and status - window contents only at a single location and let them do it - automagically. + * src/gui/window.cpp: Bail out early if there's no window container. + * src/engine.cpp, src/game.cpp, src/gui/stats.cpp, src/gui/stats.h, + src/gui/status.cpp, src/gui/status.h: Update the stats and status + window contents only at a single location and let them do it + automagically. * src/gui/updatewindow.cpp, src/gui/updatewindow.h: Small cleanups. 2005-08-25 Ferreira Yohann <bertram@cegetel.net> diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 4184f17a..0fe941bc 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -55,6 +55,10 @@ Window::Window(const std::string& caption, bool modal, Window *parent): { logger->log("Window::Window(\"%s\")", caption.c_str()); + if (!windowContainer) { + throw GCN_EXCEPTION("Window::Window. no windowContainer set"); + } + if (instances == 0) { // Load static resources @@ -85,12 +89,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent): setContent(chrome); // Add this window to the window container - if (windowContainer) { - windowContainer->add(this); - } - else { - throw GCN_EXCEPTION("Window::Window. no windowContainer set"); - } + windowContainer->add(this); // Send GUI alpha changed for initialization optionChanged("guialpha"); |