From 38c36f01580c293dc77d246f376176d186402ca4 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 6 Aug 2009 10:57:42 +0000 Subject: [PATCH] Added a viewer.frame() call prior to the useCursor(false) calls to avoid a threading crash under X11 --- applications/present3D/present3D.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/applications/present3D/present3D.cpp b/applications/present3D/present3D.cpp index db606c30b..60be9cc97 100644 --- a/applications/present3D/present3D.cpp +++ b/applications/present3D/present3D.cpp @@ -591,9 +591,14 @@ int main( int argc, char **argv ) viewerInitialized = true; } - + 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 osgViewer::Viewer::Windows windows; viewer.getWindows(windows);