Merge lp:~gerboland/unity-2d/launcher-geis-crash-fix into lp:unity-2d

Proposed by Gerry Boland on 2011-11-08
Status: Merged
Approved by: Lohith D Shivamurthy on 2011-11-08
Approved revision: 770
Merged at revision: 771
Proposed branch: lp:~gerboland/unity-2d/launcher-geis-crash-fix
Merge into: lp:unity-2d
Diff against target: 26 lines (+7/-2)
1 file modified
launcher/app/gesturehandler.cpp (+7/-2)
To merge this branch: bzr merge lp:~gerboland/unity-2d/launcher-geis-crash-fix
Reviewer Review Type Date Requested Status
Lohith D Shivamurthy (community) 2011-11-08 Approve on 2011-11-08
Review via email: mp+81577@code.launchpad.net

Description of the change

[launcher] Fix GestureHandler crash on shutdown when gestures are not supported. Also fixed source of previous compiler warning.

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/app/gesturehandler.cpp'
2--- launcher/app/gesturehandler.cpp 2011-11-08 13:31:07 +0000
3+++ launcher/app/gesturehandler.cpp 2011-11-08 13:53:06 +0000
4@@ -25,7 +25,10 @@
5
6 #include <debug_p.h>
7
8-GestureHandler::GestureHandler(Unity2dPanel* launcher, QObject *parent) : QObject(parent), m_launcher(launcher)
9+GestureHandler::GestureHandler(Unity2dPanel* launcher, QObject *parent)
10+: QObject(parent)
11+, m_geisInstance(NULL)
12+, m_launcher(launcher)
13 {
14 if (geisInitialize() != GEIS_STATUS_SUCCESS) {
15 UQ_WARNING << "GEIS initialization failed: multitouch support disabled";
16@@ -44,7 +47,9 @@
17
18 GestureHandler::~GestureHandler()
19 {
20- geis_finish(m_geisInstance);
21+ if (m_geisInstance != NULL) {
22+ geis_finish(m_geisInstance);
23+ }
24 }
25
26 GeisStatus GestureHandler::geisInitialize()

Subscribers

People subscribed via source and target branches