Merge lp:~mh21/unity/fix-for-bug-779717 into lp:unity

Proposed by Michael Hofmann
Status: Merged
Approved by: Tim Penhey
Approved revision: 1196
Merged at revision: 1197
Proposed branch: lp:~mh21/unity/fix-for-bug-779717
Merge into: lp:unity
Diff against target: 28 lines (+3/-3)
1 file modified
src/PanelIndicatorObjectEntryView.cpp (+3/-3)
To merge this branch: bzr merge lp:~mh21/unity/fix-for-bug-779717
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+62248@code.launchpad.net

Description of the change

Fixes bug #779717: pixbuf in indicator icon update was retrieved twice, and not unrefed correctly.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

 merge approved

I saw that today too. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/PanelIndicatorObjectEntryView.cpp'
2--- src/PanelIndicatorObjectEntryView.cpp 2011-05-13 03:16:23 +0000
3+++ src/PanelIndicatorObjectEntryView.cpp 2011-05-25 06:44:31 +0000
4@@ -242,14 +242,12 @@
5 x = _padding;
6 y = 0;
7
8- if (_proxy->GetPixbuf () && _proxy->icon_visible)
9+ if (pixbuf && _proxy->icon_visible)
10 {
11 gdk_cairo_set_source_pixbuf (cr, pixbuf, x, (int)((height - gdk_pixbuf_get_height (pixbuf))/2));
12 cairo_paint_with_alpha (cr, _proxy->icon_sensitive ? 1.0 : 0.5);
13
14 x += icon_width + SPACING;
15-
16- g_object_unref (pixbuf);
17 }
18
19 if (label && _proxy->label_visible)
20@@ -311,6 +309,8 @@
21 refreshed.emit (this);
22 if (label)
23 g_free (label);
24+ if (pixbuf)
25+ g_object_unref (pixbuf);
26 }
27
28 static void