From 5209b33c3175de7f80bc326d39785c9d5fb70262 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 17 Sep 2008 17:13:13 +0000 Subject: [PATCH] From Max Bandazian, "Lines 302-305 of WindowManager.cpp seem to have a parenthesizing error - the code is if( (!win || win->getVisibilityMode() == Window::VM_PARTIAL) && !win->isPointerXYWithinVisible(x, y) ) continue; But it probably should be if (!win || (win->getVisibilityMode() == Window::VM_PARTIAL) && !win->isPointerXYWithinVisible(x, y))) continue; The effect of the bug is to segfault if a non-osgWidgets::Window node hasn't been excluded from picking via NodeMask." --- src/osgWidget/WindowManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/osgWidget/WindowManager.cpp b/src/osgWidget/WindowManager.cpp index 06bf15bc0..3ff7aa1da 100644 --- a/src/osgWidget/WindowManager.cpp +++ b/src/osgWidget/WindowManager.cpp @@ -299,10 +299,11 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl) { // Make sure that our window is valid, and that our pick is within the // "visible area" of the Window. - if( - (!win || win->getVisibilityMode() == Window::VM_PARTIAL) && - !win->isPointerXYWithinVisible(x, y) - ) continue; + if(!win || + (win->getVisibilityMode()==Window::VM_PARTIAL && !win->isPointerXYWithinVisible(x, y))) + { + continue; + } // Set our activeWin, so that we know when we've got all the Widgets // that belong to it.