This is always asking for problems. Additionally, that call was leading to OpenGL calls happening from threads.