summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-30 10:57:21 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-30 12:08:25 (GMT)
commit8af8a969ea7266ecdce4cbbc89c3e505074b5286 (patch)
treefd59f187475581211a6ed432a87a98514287a81d /src
parent9566b696026402f4c4b84ca0cd86126c84f89fd1 (diff)
downloadQt-8af8a969ea7266ecdce4cbbc89c3e505074b5286.zip
Qt-8af8a969ea7266ecdce4cbbc89c3e505074b5286.tar.gz
Qt-8af8a969ea7266ecdce4cbbc89c3e505074b5286.tar.bz2
Fixed X error in qxcbwindowsurface.cpp
Don't free null GC.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindowsurface.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
index 61239af..110aa10 100644
--- a/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindowsurface.cpp
@@ -120,7 +120,8 @@ void QXcbShmImage::destroy()
void QXcbShmImage::put(xcb_window_t window, const QPoint &target, const QRect &source)
{
if (m_gc_window != window) {
- Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
+ if (m_gc)
+ Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
m_gc = xcb_generate_id(xcb_connection());
Q_XCB_CALL(xcb_create_gc(xcb_connection(), m_gc, window, 0, 0));