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 /src/gui/window.cpp | |
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.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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"); |