diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-08-20 11:41:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-21 16:39:55 +0200 |
commit | f7ebb8d4c64030a0569f8f2af98dad665a6866a7 (patch) | |
tree | f8fcb7da88333893de224acf57a5d2f7d63571ea /src/plugins/platforms/xcb/qxcbbackingstore.cpp | |
parent | bd9a023a41209a216eec28bd25a20372a5172b6a (diff) |
QXcbBackingStore: don't crash in flush() if no platformWindow
Task-number: QTBUG-32681
Change-Id: Iec7204985867a8d65cea393ba6ab66d328a5e7b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 1f2485db0d..dc677cd3be 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -306,6 +306,10 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoin Q_XCB_NOOP(connection()); QXcbWindow *platformWindow = static_cast<QXcbWindow *>(window->handle()); + if (!platformWindow) { + qWarning("QXcbBackingStore::flush: QWindow has no platform window (QTBUG-32681)"); + return; + } QVector<QRect> rects = clipped.rects(); for (int i = 0; i < rects.size(); ++i) |