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

Proposed by Daniel van Vugt
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 1772
Proposed branch: lp:~vanvugt/unity/fix-887465-trunk
Merge into: lp:unity
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-trunk
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+84908@code.launchpad.net

Description of the change

Fix SIGSEGV after SwitcherController desctruction (LP: #887465)

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

+1

review: Approve

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-12-02 17:51:26 +0000
3+++ plugins/unityshell/src/SwitcherController.cpp 2011-12-08 09:41:24 +0000
4@@ -49,6 +49,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)&Controller::OnBackgroundUpdate,
11 this);
12@@ -56,6 +57,7 @@
13
14 Controller::~Controller()
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-12-06 20:13:55 +0000
23+++ plugins/unityshell/src/SwitcherController.h 2011-12-08 09:41:24 +0000
24@@ -125,6 +125,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);