summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbbackingstore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 0b9717759b..f4382c7b50 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -145,8 +145,6 @@ void QXcbShmImage::destroy()
if (segmentSize && m_shm_info.shmaddr)
Q_XCB_CALL(xcb_shm_detach(xcb_connection(), m_shm_info.shmseg));
- xcb_image_destroy(m_xcb_image);
-
if (segmentSize) {
if (m_shm_info.shmaddr) {
shmdt(m_shm_info.shmaddr);
@@ -156,6 +154,8 @@ void QXcbShmImage::destroy()
}
}
+ xcb_image_destroy(m_xcb_image);
+
if (m_gc)
Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
}