Fixed X11 related crash that occured when GraphicsWindow::setCursor was called right after viewer.realize();

The fix was to simply move the setting of the thread that has done the makeCurrent to right before the makeCurrent()
rather than right after.
This commit is contained in:
Robert Osfield 2011-05-30 09:25:11 +00:00
parent c8f8b2b149
commit 4d09574ccd

View File

@ -579,12 +579,12 @@ void GraphicsContext::close(bool callCloseImplementation)
bool GraphicsContext::makeCurrent()
{
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
bool result = makeCurrentImplementation();
if (result)
{
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
// initialize extension process, not only initializes on first
// call, will be a non-op on subsequent calls.
getState()->initializeExtensionProcs();