summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-23 18:41:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-23 18:41:27 +0300
commit2443f62e578283b20aaed1874fb356753774cf79 (patch)
tree01dd92a02a60a814710708af2155d4ead9386ce1 /src/gui/widgets/popup.cpp
parentc44828b14dce7e00ca01791eecf2bc452ee4cb00 (diff)
downloadmanaplus-2443f62e578283b20aaed1874fb356753774cf79.tar.gz
manaplus-2443f62e578283b20aaed1874fb356753774cf79.tar.bz2
manaplus-2443f62e578283b20aaed1874fb356753774cf79.tar.xz
manaplus-2443f62e578283b20aaed1874fb356753774cf79.zip
Add check in popups for posInit() calls.
If postInit() was not called show error in log.
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r--src/gui/widgets/popup.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index a2c441225..a69c7a654 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -44,11 +44,12 @@ Popup::Popup(const std::string &name,
mPadding(3),
mSkin(nullptr),
mPopupName(name),
+ mVertexes(new ImageCollection),
mMinWidth(100),
mMinHeight(40),
mMaxWidth(mainGraphics->mWidth),
mMaxHeight(mainGraphics->mHeight),
- mVertexes(new ImageCollection)
+ mInit(false)
{
logger->log("Popup::Popup(\"%s\")", name.c_str());
@@ -86,6 +87,12 @@ Popup::~Popup()
theme->unload(mSkin);
mSkin = nullptr;
}
+
+ if (!mInit)
+ {
+ logger->log("error: Popup created without calling postInit(): "
+ + mPopupName);
+ }
}
void Popup::setWindowContainer(WindowContainer *const wc)