summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/widget.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index 1a8743ee..8824baeb 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -662,11 +662,9 @@ int Widget::getAvailWidth (bool forceValue)
int viewportWidth =
layout->viewportWidth - (layout->canvasHeightGreater ?
layout->vScrollbarThickness : 0);
- width = -1;
+ width = viewportWidth;
calcFinalWidth (getStyle (), viewportWidth, NULL, 0, forceValue, &width);
- if (width == -1)
- width = viewportWidth;
-
+ assert(width != -1);
DBG_OBJ_MSG_END ();
} else if (parent) {
DBG_OBJ_MSG ("resize", 1, "delegated to parent");