QXcbBackingStore: don't crash in flush() if no platformWindow

Task-number: QTBUG-32681
Change-Id: Iec7204985867a8d65cea393ba6ab66d328a5e7b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Shawn Rutledge 2013-08-20 11:41:15 +02:00 committed by The Qt Project
parent bd9a023a41
commit f7ebb8d4c6

View File

@ -306,6 +306,10 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion &region, 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)