diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 18:09:22 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-17 18:09:22 +0200 |
commit | ad155f3f9846ba5ff7a8a7546620b9e8f431bb14 (patch) | |
tree | 0512cb02859f9f994129eb085a3bac4163c4e7c4 /dw/layout.cc | |
parent | fde258b24ec096ffc7d4d68f02cccbc36f896d96 (diff) |
refcount Layout::bgColor
Diffstat (limited to 'dw/layout.cc')
-rw-r--r-- | dw/layout.cc | 7 |
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); } |