summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/layout.cpp7
-rw-r--r--src/gui/widgets/window.cpp3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp
index 382d169dc..a14b416ce 100644
--- a/src/gui/widgets/layout.cpp
+++ b/src/gui/widgets/layout.cpp
@@ -68,7 +68,9 @@ LayoutArray &LayoutCell::getArray()
void LayoutCell::reflow(int nx, int ny, int nw, int nh)
{
- assert(mType != NONE);
+ if (mType == NONE)
+ return;
+
nx += mHPadding;
ny += mVPadding;
nw -= 2 * mHPadding;
@@ -81,7 +83,8 @@ void LayoutCell::reflow(int nx, int ny, int nw, int nh)
void LayoutCell::computeSizes()
{
- assert(mType == ARRAY);
+ if (mType != ARRAY)
+ return;
std::vector< std::vector< LayoutCell * > >::iterator
i = mArray->mCells.begin();
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 7508d4e4b..0a3779307 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -663,7 +663,8 @@ void Window::setModal(bool modal)
void Window::loadWindowState()
{
const std::string &name = mWindowName;
- assert(!name.empty());
+ if (name.empty())
+ return;
setPosition(config.getValueInt(name + "WinX", mDefaultX),
config.getValueInt(name + "WinY", mDefaultY));