diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-06 09:32:01 +0000 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-07 06:59:20 +0200 |
commit | 21ab7593b96d4e867408364949a874b6bddebca2 (patch) | |
tree | f3907706b18b3bef61ded403096be3b8d03d4d5e | |
parent | 7b9b823748da38fbf35483165030e14d2d26e837 (diff) |
Fail gracefully if EGL image creation failed
Change-Id: Iacd5542ca5bc27afab7ea5f27afec4debe69be74
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r-- | customcontext/texture/eglgralloctexture.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/customcontext/texture/eglgralloctexture.cpp b/customcontext/texture/eglgralloctexture.cpp index eb9674e..8f1bae8 100644 --- a/customcontext/texture/eglgralloctexture.cpp +++ b/customcontext/texture/eglgralloctexture.cpp @@ -211,8 +211,13 @@ NativeBuffer::NativeBuffer(const QImage &image) (ANativeWindowBuffer *) this, 0); - if (!m_eglImage) - qFatal("no egl image..."); + if (!m_eglImage) { +#ifdef CUSTOMCONTEXT_DEBUG + qDebug("EglGrallocTexture: failed to create EGLImage, error=%x", eglGetError()); +#endif + release(); + return; + } #ifdef CUSTOMCONTEXT_DEBUG quint64 imageTime = timer.elapsed(); |