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."
This commit is contained in:
Robert Osfield 2008-09-17 17:13:13 +00:00
parent 5052432cc7
commit 5209b33c31

View File

@ -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 // Make sure that our window is valid, and that our pick is within the
// "visible area" of the Window. // "visible area" of the Window.
if( if(!win ||
(!win || win->getVisibilityMode() == Window::VM_PARTIAL) && (win->getVisibilityMode()==Window::VM_PARTIAL && !win->isPointerXYWithinVisible(x, y)))
!win->isPointerXYWithinVisible(x, y) {
) continue; continue;
}
// Set our activeWin, so that we know when we've got all the Widgets // Set our activeWin, so that we know when we've got all the Widgets
// that belong to it. // that belong to it.