summaryrefslogtreecommitdiff
path: root/dw/widget.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-17 22:14:11 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-10-17 22:14:11 +0200
commit90531a3492332a841770ffe32257c97f5531dc0d (patch)
treefce6f32e89cd67a956a84867d1564e632ad70901 /dw/widget.cc
parent9e7f46acf51ab4dd0c3e0e1c2d7dcb47d4e709e9 (diff)
first ref() then unref() in Widget::setStyle()
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) {