summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglwindow.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp
index 67f39a498b0..066c3a3d8d6 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp
@@ -104,8 +104,8 @@ void QAndroidPlatformOpenGLWindow::applicationStateChanged(Qt::ApplicationState
void QAndroidPlatformOpenGLWindow::createEgl(EGLConfig config)
{
clearSurface();
- QJniEnvironment env;
- m_nativeWindow = ANativeWindow_fromSurface(env.jniEnv(), m_androidSurfaceObject.object());
+ m_nativeWindow = ANativeWindow_fromSurface(
+ QJniEnvironment::getJniEnv(), m_androidSurfaceObject.object());
m_androidSurfaceObject = QJniObject();
m_eglSurface = eglCreateWindowSurface(m_eglDisplay, config, m_nativeWindow, NULL);
m_format = q_glFormatFromConfig(m_eglDisplay, config, window()->requestedFormat());