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 74d73d7cdf..bbde948090 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -181,8 +181,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);
@@ -192,6 +190,8 @@ void QXcbShmImage::destroy()
}
}
+ xcb_image_destroy(m_xcb_image);
+
if (m_gc)
Q_XCB_CALL(xcb_free_gc(xcb_connection(), m_gc));
delete m_graphics_buffer;