aboutsummaryrefslogtreecommitdiff
path: root/dw/widget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/widget.cc')
-rw-r--r--dw/widget.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index ee8cb17c..2a6fbfc3 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -292,13 +292,14 @@ void Widget::setStyle (style::Style *style)
{
bool sizeChanged;
+ style->ref ();
+
if (this->style) {
sizeChanged = this->style->sizeDiffs (style);
this->style->unref ();
} else
sizeChanged = true;
- style->ref ();
this->style = style;
if (layout != NULL) {