diff options
-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"); |