From 6ea7336e4aed916c5c9602c51d7d9646a289e83b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 29 Oct 2013 12:16:30 +0100 Subject: eglfs: Make backingstore handle unexpected scenarios gracefully On platforms other than Android eglfs does not allow having multiple windows when one of the windows is OpenGL. On Android however this has to be handled silently, without aborting the application. The backingstore lacked the necessary checks so QGLWidget-based apps were crashing. This is now corrected. Task-number: QTBUG-34412 Change-Id: Ifb469fa9ef391b24aed3942430c0347276809ba5 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp index 8de8268616..9de5960fdb 100644 --- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp +++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp @@ -113,7 +113,7 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo #endif QEglFSWindow *rootWin = m_window->screen()->rootWindow(); - if (!rootWin) + if (!rootWin || !rootWin->isRaster()) return; m_window->create(); @@ -132,7 +132,7 @@ void QEglFSBackingStore::resize(const QSize &size, const QRegion &staticContents Q_UNUSED(staticContents); QEglFSWindow *rootWin = m_window->screen()->rootWindow(); - if (!rootWin) + if (!rootWin || !rootWin->isRaster()) return; m_image = QImage(size, QImage::Format_RGB32); -- cgit v1.2.3