aboutsummaryrefslogtreecommitdiff
path: root/dw/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/layout.cc')
-rw-r--r--dw/layout.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index aa9f05ed..1835ab96 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -223,7 +223,8 @@ Layout::~Layout ()
platform->removeIdle (scrollIdleId);
if (resizeIdleId != -1)
platform->removeIdle (resizeIdleId);
-
+ if (bgColor)
+ bgColor->unref ();
if (topLevel)
delete topLevel;
delete platform;
@@ -610,7 +611,11 @@ void Layout::updateCursor ()
void Layout::setBgColor (style::Color *color)
{
+ if (bgColor)
+ bgColor->unref ();
+
bgColor = color;
+ bgColor->ref ();
if (view)
view->setBgColor (bgColor);
}