diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 22:14:11 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 22:14:11 +0200 |
commit | 90531a3492332a841770ffe32257c97f5531dc0d (patch) | |
tree | fce6f32e89cd67a956a84867d1564e632ad70901 /dw | |
parent | 9e7f46acf51ab4dd0c3e0e1c2d7dcb47d4e709e9 (diff) |
first ref() then unref() in Widget::setStyle()
Diffstat (limited to 'dw')
-rw-r--r-- | dw/widget.cc | 3 |
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) { |