diff options
| author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2025-08-28 13:56:41 +0300 |
|---|---|---|
| committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2025-09-01 21:31:58 +0300 |
| commit | 9ddf467544fd91b72bb12b66e7a3dd80a2121c43 (patch) | |
| tree | eb632292f576cf367c5fac37ec6a84861066d490 /src/plugins/platforms/android/qandroidplatformopenglcontext.cpp | |
| parent | 8a8d64cd7cf265b0ec94686399b42f6871026d34 (diff) | |
Android: ensure ANativeWindow_fromSurface() is called on valid object
Amends b25c1e8452ecffa70b4b75fdb579f08187b36a63.
The above change simplified the logic there but introduced a
potential crash if m_surfaceCreated is true while the surface
m_androidSurfaceObject has not yet been initialized.
Pick-to: 6.10
Change-Id: Ia185aef175022b973614950857aae4e02cb8c0d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglcontext.cpp')
| -rw-r--r-- | src/plugins/platforms/android/qandroidplatformopenglcontext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp index a6cc706785e..62e9727770c 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp @@ -34,8 +34,7 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface) // by Android window->lockSurface(); - if (window->makeCurrentNeeded()) { - window->createEgl(eglConfig()); + if (window->ensureEglSurfaceCreated(eglConfig())) { // Call base class implementation directly since we are already locked QEGLPlatformContext::makeCurrent(surface); } |
