summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfswindow.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-10-25 14:36:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-26 22:39:30 +0200
commitfe4068a12b135add4e1203fc1214d238865b49a1 (patch)
tree3801d5ae5ba84a429e55a7da9cc807c80a96354d /src/plugins/platforms/eglfs/qeglfswindow.cpp
parent9dacccd0391219c97c01e89f0547ee002abb1e55 (diff)
Check the EGL error before calling eglTerminate().
Otherwise we always get EGL_SUCCESS, which is not very informative. Change-Id: I25311c14108ae385913aa9dc159a1f5fad142342 Reviewed-by: Rainer Keller <rainer.keller@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfswindow.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 036b26a165..32d20e6aaa 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -89,8 +89,9 @@ void QEglFSWindow::create()
m_window = hooks->createNativeWindow(hooks->screenSize(), m_format);
m_surface = eglCreateWindowSurface(display, config, m_window, NULL);
if (m_surface == EGL_NO_SURFACE) {
+ EGLint error = eglGetError();
eglTerminate(display);
- qFatal("EGL Error : Could not create the egl surface: error = 0x%x\n", eglGetError());
+ qFatal("EGL Error : Could not create the egl surface: error = 0x%x\n", error);
}
}