summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-20 08:39:10 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-20 08:39:10 (GMT)
commit92e89ade291877a1146ca3e121fba5f491f61b84 (patch)
tree1f2f4fbcd1ef377880f5fc69bd0574dc2fc339b4 /src
parentc5ea31fa7784884a86cdae95e3a018d790853a83 (diff)
parent092cfe31463146c17f99543e36cdd7da85961afc (diff)
downloadQt-92e89ade291877a1146ca3e121fba5f491f61b84.zip
Qt-92e89ade291877a1146ca3e121fba5f491f61b84.tar.gz
Qt-92e89ade291877a1146ca3e121fba5f491f61b84.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qgl_x11.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index f4cc7c7..61a16be 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1651,8 +1651,12 @@ static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice)
{
return false; // Can't use TFP without NPOT
}
+
const QX11Info *xinfo = qt_x11Info(paintDevice);
- QGLExtensionMatcher extensions(glXQueryExtensionsString(xinfo->display(), xinfo->screen()));
+ Display *display = xinfo ? xinfo->display() : X11->display;
+ int screen = xinfo ? xinfo->screen() : X11->defaultScreen;
+
+ QGLExtensionMatcher extensions(glXQueryExtensionsString(display, screen));
if (extensions.match("GLX_EXT_texture_from_pixmap")) {
glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT");
glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT");