[Mesa-dev] [PATCH 7/7] egl: Fix DebugMessageControl(callback, NULL)

Adam Jackson ajax at redhat.com
Thu Sep 8 17:47:02 UTC 2016


Treat a null attribute list as meaning "don't change attributes". This
is semantically equivalent to a list consisting of just EGL_NONE.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 src/egl/main/eglapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 3bbf3de..0034f1e 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -2069,9 +2069,9 @@ eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list
             }
          }
 
-         _eglGlobal.debugCallback = callback;
          _eglGlobal.debugTypesEnabled = newEnabled;
       }
+      _eglGlobal.debugCallback = callback;
    } else {
       _eglGlobal.debugCallback = NULL;
       _eglGlobal.debugTypesEnabled = _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR;
-- 
2.9.3



More information about the mesa-dev mailing list