From fe4068a12b135add4e1203fc1214d238865b49a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 25 Oct 2012 14:36:45 +0200 Subject: 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 Reviewed-by: Andy Nichols --- src/plugins/platforms/eglfs/qeglfswindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms') 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); } } -- cgit v1.2.3