Merge lp:~azzar1/unity/fix-crash-acc-controller into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4155
Proposed branch: lp:~azzar1/unity/fix-crash-acc-controller
Merge into: lp:unity
Diff against target: 15 lines (+2/-2)
1 file modified
lockscreen/LockScreenAcceleratorController.cpp (+2/-2)
To merge this branch: bzr merge lp:~azzar1/unity/fix-crash-acc-controller
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+300738@code.launchpad.net

Commit message

Make sure initiate and terminate callbacks are not empty before calling them.

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

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lockscreen/LockScreenAcceleratorController.cpp'
2--- lockscreen/LockScreenAcceleratorController.cpp 2016-07-05 10:22:08 +0000
3+++ lockscreen/LockScreenAcceleratorController.cpp 2016-07-21 10:09:18 +0000
4@@ -193,10 +193,10 @@
5
6 CompOption::Vector options;
7
8- if (action.state() & CompAction::StateInitKey)
9+ if (action.initiate() && action.state() & CompAction::StateInitKey)
10 action.initiate()(&action, 0, options);
11
12- if (action.state() & CompAction::StateTermKey)
13+ if (action.terminate() && action.state() & CompAction::StateTermKey)
14 action.terminate()(&action, CompAction::StateTermTapped, options);
15 }
16