Merge lp:~bilalakhtar/unity/fix-unity-crash-on-hidden-quicklistitem into lp:unity

Proposed by Bilal Akhtar
Status: Merged
Merged at revision: 1188
Proposed branch: lp:~bilalakhtar/unity/fix-unity-crash-on-hidden-quicklistitem
Merge into: lp:unity
Diff against target: 15 lines (+5/-0)
1 file modified
src/LauncherIcon.cpp (+5/-0)
To merge this branch: bzr merge lp:~bilalakhtar/unity/fix-unity-crash-on-hidden-quicklistitem
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+61067@code.launchpad.net

Description of the change

This branch makes Unity ignore a Dbusmenu MenuItem if its PROP_VISIBLE isn't true. This fixes the crash bug #759174 which would make Unity crash if there was a Dbusmenu MenuItem which doesn't have its visible property set to true.

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

should be

// Skip this item, it's invisible right now
if (!prop_visible)
  continue;

Will update and commit to trunk and unity/3.0

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/LauncherIcon.cpp'
2--- src/LauncherIcon.cpp 2011-04-20 09:40:45 +0000
3+++ src/LauncherIcon.cpp 2011-05-16 06:18:29 +0000
4@@ -520,6 +520,11 @@
5
6 const gchar* type = dbusmenu_menuitem_property_get (menu_item, DBUSMENU_MENUITEM_PROP_TYPE);
7 const gchar* toggle_type = dbusmenu_menuitem_property_get (menu_item, DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE);
8+ gboolean prop_visible = dbusmenu_menuitem_property_get_bool (menu_item, DBUSMENU_MENUITEM_PROP_VISIBLE);
9+
10+ if (prop_visible != true) {
11+ continue; // Skip this item, it is invisible right now.
12+ }
13
14 if (g_strcmp0 (type, DBUSMENU_CLIENT_TYPES_SEPARATOR) == 0)
15 {