changeset 1751:4eabd51a5d96

first ref() then unref() in Widget::setStyle()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sun, 17 Oct 2010 22:14:11 +0200
parents 5b5ef1888a47
children 6ad8e023a9f0 f202741aa840 cc7c9180ae95
files dw/widget.cc
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw/widget.cc	Sun Oct 17 22:12:45 2010 +0200
+++ b/dw/widget.cc	Sun Oct 17 22:14:11 2010 +0200
@@ -292,13 +292,14 @@
 {
    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) {