Added a viewer.frame() call prior to the useCursor(false) calls to avoid a threading crash under X11

This commit is contained in:
Robert Osfield 2009-08-06 10:57:42 +00:00
parent 45efe61d44
commit 38c36f0158

View File

@ -594,6 +594,11 @@ int main( int argc, char **argv )
if (!cursorFileName.empty()) if (!cursorFileName.empty())
{ {
// have to add a frame in here to avoid problems with X11 threading issue on switching off the cursor
// not yet sure why it makes a difference, but it at least fixes the crash that would otherwise occur
// under X11.
viewer.frame();
// switch off the cursor // switch off the cursor
osgViewer::Viewer::Windows windows; osgViewer::Viewer::Windows windows;
viewer.getWindows(windows); viewer.getWindows(windows);