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
=== modified file 'plugins/unityshell/src/SwitcherController.cpp'
--- plugins/unityshell/src/SwitcherController.cpp 2011-12-02 17:51:26 +0000
+++ plugins/unityshell/src/SwitcherController.cpp 2011-12-08 09:41:24 +0000
@@ -49,6 +49,7 @@
49 bg_color_ = nux::Color(0.0, 0.0, 0.0, 0.5);49 bg_color_ = nux::Color(0.0, 0.0, 0.0, 0.5);
5050
51 UBusServer *ubus = ubus_server_get_default();51 UBusServer *ubus = ubus_server_get_default();
52 bg_update_handle_ =
52 ubus_server_register_interest(ubus, UBUS_BACKGROUND_COLOR_CHANGED,53 ubus_server_register_interest(ubus, UBUS_BACKGROUND_COLOR_CHANGED,
53 (UBusCallback)&Controller::OnBackgroundUpdate,54 (UBusCallback)&Controller::OnBackgroundUpdate,
54 this);55 this);
@@ -56,6 +57,7 @@
5657
57Controller::~Controller()58Controller::~Controller()
58{59{
60 ubus_server_unregister_interest(ubus_server_get_default(), bg_update_handle_);
59 if (view_window_)61 if (view_window_)
60 view_window_->UnReference();62 view_window_->UnReference();
61}63}
6264
=== modified file 'plugins/unityshell/src/SwitcherController.h'
--- plugins/unityshell/src/SwitcherController.h 2011-12-06 20:13:55 +0000
+++ plugins/unityshell/src/SwitcherController.h 2011-12-08 09:41:24 +0000
@@ -125,6 +125,7 @@
125 guint detail_timer_;125 guint detail_timer_;
126 nux::Color bg_color_;126 nux::Color bg_color_;
127 DetailMode detail_mode_;127 DetailMode detail_mode_;
128 guint bg_update_handle_;
128129
129 static gboolean OnShowTimer(gpointer data);130 static gboolean OnShowTimer(gpointer data);
130 static gboolean OnDetailTimer(gpointer data);131 static gboolean OnDetailTimer(gpointer data);