summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglimage.c')
-rw-r--r--src/egl/main/eglimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index a96075fe558..72a556e8dbd 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -302,6 +302,13 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
if (err == EGL_SUCCESS)
continue;
+ /* EXT_image_dma_buf_import states that if invalid value is provided for
+ * its attributes, we should return EGL_BAD_ATTRIBUTE.
+ * Bail out ASAP, since follow-up calls can return another EGL_BAD error.
+ */
+ if (err == EGL_BAD_ATTRIBUTE)
+ return _eglError(err, __func__);
+
err = _eglParseEXTImageDmaBufImportModifiersAttribs(attrs, dpy, attr, val);
if (err == EGL_SUCCESS)
continue;