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.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index df6cf318bb..2c6ec62475 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -291,7 +291,12 @@ void QXcbBackingStore::resize(const QSize &size, const QRegion &)
Q_XCB_NOOP(connection());
QXcbScreen *screen = static_cast<QXcbScreen *>(window()->screen()->handle());
- QXcbWindow* win = static_cast<QXcbWindow *>(window()->handle());
+ QPlatformWindow *pw = window()->handle();
+ if (!pw) {
+ window()->create();
+ pw = window()->handle();
+ }
+ QXcbWindow* win = static_cast<QXcbWindow *>(pw);
delete m_image;
m_image = new QXcbShmImage(screen, size, win->depth(), win->imageFormat());