diff --git a/src/osg/GraphicsThread.cpp b/src/osg/GraphicsThread.cpp index af7a10aca..dcf36aaf1 100644 --- a/src/osg/GraphicsThread.cpp +++ b/src/osg/GraphicsThread.cpp @@ -122,6 +122,19 @@ int GraphicsThread::cancel() // then wait for the the thread to stop running. while(isRunning()) { + for(OperationQueue::iterator itr = _operations.begin(); + itr != _operations.end(); + ++itr) + { + BarrierOperation* barrier = dynamic_cast(itr->get()); + if (barrier) + { + barrier->release(); + //barrier->invalidate(); + osg::notify(osg::INFO)<<" Invalidating barrier "<realize(); } + + // _rs->useConfigEventThread(false); _closeOnDestruction = true; }