Android: Check for null pointer before calling ANativeWindow_release()
Calling ANativeWindow_release() with a null pointer will cause a SIGSEGV. Task-number: QTBUG-33955 Change-Id: If7d1afa3baea04360507eec5042b4e18a0272527 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
159f086a7f
commit
efc61299bd
@ -120,7 +120,8 @@ EGLNativeWindowType QEglFSAndroidHooks::createNativeWindow(QPlatformWindow *plat
|
||||
|
||||
void QEglFSAndroidHooks::destroyNativeWindow(EGLNativeWindowType window)
|
||||
{
|
||||
ANativeWindow_release(window);
|
||||
if (window != 0)
|
||||
ANativeWindow_release(window);
|
||||
}
|
||||
|
||||
bool QEglFSAndroidHooks::hasCapability(QPlatformIntegration::Capability capability) const
|
||||
|
Loading…
Reference in New Issue
Block a user