From 075648e46650797f2b520f98513a7aed9f0ffec7 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Fri, 25 Jun 2010 15:47:58 +0200 Subject: Warn if surface creation fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Output the same warning that qegl.cpp does also in the X11 implementation. Reviewed-by: Trond Kjernåsen --- src/gui/egl/qegl_x11.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index 969acc4..fea6e8d 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -415,7 +415,10 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg // At this point, the widget's window should be created and have the correct visual. Now we // just need to create the EGL surface for it: - return eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0); + EGLSurface surf = eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0); + if (surf == EGL_NO_SURFACE) + qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); + return surf; } if (x11PixmapData) { -- cgit v0.12