From 836bbfced3e8c76cc0ac7458a54c7a2982ebea1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 24 Sep 2009 15:02:23 +0200 Subject: Prevented crash in svgviewer in graphics system OpenGL with QGLWidget. Need to make sure the correct context is current when painting on the window surface FBO. Reviewed-by: Kim --- src/opengl/qwindowsurface_gl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index e34b637..cddc53f 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -378,6 +378,8 @@ QPaintDevice *QGLWindowSurface::paintDevice() if (d_ptr->ctx) return &d_ptr->glDevice; + QGLContext *ctx = reinterpret_cast(window()->d_func()->extraData()->glContext); + ctx->makeCurrent(); return d_ptr->fbo; } -- cgit v0.12