eglfs: Check for a valid window handle before attempting to retrieve resources.
In the case of a window that is not yet shown, or destroyed, there will not be a native handle, and this would crash. Change-Id: Ib8c1a4490d82654d04073dac240eaa1275cbc1b0 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>bb10
parent
afce2b528c
commit
500deb9a08
|
|
@ -207,7 +207,7 @@ void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWi
|
|||
QByteArray lowerCaseResource = resource.toLower();
|
||||
|
||||
if (lowerCaseResource == "egldisplay") {
|
||||
if (window)
|
||||
if (window && window->handle())
|
||||
return static_cast<QEglFSScreen *>(window->handle()->screen())->display();
|
||||
else
|
||||
return static_cast<QEglFSScreen *>(mScreen)->display();
|
||||
|
|
|
|||
Loading…
Reference in New Issue