Merge lp:~vanvugt/unity/fix-887465-4.0 into lp:unity/4.0

Proposed by Daniel van Vugt on 2011-12-08
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2011-12-08
Approved revision: 1721
Merged at revision: 1730
Proposed branch: lp:~vanvugt/unity/fix-887465-4.0
Merge into: lp:unity/4.0
Diff against target: 31 lines (+3/-0)
2 files modified
plugins/unityshell/src/SwitcherController.cpp (+2/-0)
plugins/unityshell/src/SwitcherController.h (+1/-0)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-887465-4.0
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2011-12-08 Approve on 2011-12-08
Review via email: mp+84909@code.launchpad.net

Description of the change

Fix SIGSEGV after SwitcherController desctruction (LP: #887465)

To post a comment you must log in.
lp:~vanvugt/unity/fix-887465-4.0 updated on 2011-12-08
1721. By Daniel van Vugt on 2011-12-08

Safer destruction order.

Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve
Daniel van Vugt (vanvugt) wrote :

This fix is now committed upstream in lp:ubuntu (http://bazaar.launchpad.net/~unity-team/unity/trunk/revision/1772)

I hope we can get it into 4.0 as well for oneiric-updates...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/SwitcherController.cpp'
2--- plugins/unityshell/src/SwitcherController.cpp 2011-10-02 21:28:52 +0000
3+++ plugins/unityshell/src/SwitcherController.cpp 2011-12-08 09:42:23 +0000
4@@ -45,6 +45,7 @@
5 bg_color_ = nux::Color(0.0, 0.0, 0.0, 0.5);
6
7 UBusServer *ubus = ubus_server_get_default();
8+ bg_update_handle_ =
9 ubus_server_register_interest(ubus, UBUS_BACKGROUND_COLOR_CHANGED,
10 (UBusCallback)&SwitcherController::OnBackgroundUpdate,
11 this);
12@@ -52,6 +53,7 @@
13
14 SwitcherController::~SwitcherController()
15 {
16+ ubus_server_unregister_interest(ubus_server_get_default(), bg_update_handle_);
17 if (view_window_)
18 view_window_->UnReference();
19 }
20
21=== modified file 'plugins/unityshell/src/SwitcherController.h'
22--- plugins/unityshell/src/SwitcherController.h 2011-09-19 16:36:21 +0000
23+++ plugins/unityshell/src/SwitcherController.h 2011-12-08 09:42:23 +0000
24@@ -109,6 +109,7 @@
25 guint detail_timer_;
26 nux::Color bg_color_;
27 DetailMode detail_mode_;
28+ guint bg_update_handle_;
29
30 static gboolean OnShowTimer(gpointer data);
31 static gboolean OnDetailTimer(gpointer data);

Subscribers

People subscribed via source and target branches

to all changes: