Nux

Merge lp:~brandontschaefer/nux/ungrab-mouse-up-click-crash-fix into lp:nux

Proposed by Brandon Schaefer
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 673
Merged at revision: 673
Proposed branch: lp:~brandontschaefer/nux/ungrab-mouse-up-click-crash-fix
Merge into: lp:nux
Diff against target: 12 lines (+1/-1)
1 file modified
Nux/WindowCompositor.cpp (+1/-1)
To merge this branch: bzr merge lp:~brandontschaefer/nux/ungrab-mouse-up-click-crash-fix
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+126821@code.launchpad.net

Commit message

Fixes a crash in Nux, where an UnGrabPointer from an EmitMouseUpSignal would causes both mouse_over_area_ and mouse_owner_area_ to become NULL which would then cause a crash when doing EmitMouseClickSignal.

Description of the change

Fixes a crash in Nux, where an UnGrabPointer from an EmitMouseUpSignal would causes both mouse_over_area_ and mouse_owner_area_ to become NULL which would then cause a crash when doing EmitMouseClickSignal

To post a comment you must log in.
673. By Brandon Schaefer

* Changed to a better way to check for NULL

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/WindowCompositor.cpp'
2--- Nux/WindowCompositor.cpp 2012-09-26 14:25:50 +0000
3+++ Nux/WindowCompositor.cpp 2012-09-28 15:29:21 +0000
4@@ -595,7 +595,7 @@
5 event.GetMouseState(),
6 event.GetKeyState());
7
8- if (mouse_over_area_ == mouse_owner_area_)
9+ if (mouse_owner_area_.IsValid() && mouse_over_area_ == mouse_owner_area_)
10 {
11 mouse_owner_area_->EmitMouseClickSignal(mouse_owner_x, mouse_owner_y,
12 event.GetMouseState(),

Subscribers

People subscribed via source and target branches