summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/utils.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index 287d9aee4a..40f1beba5f 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -506,13 +506,8 @@ static void GLAPIENTRY gl_debug_cb(GLenum source, GLenum type, GLuint id,
void gl_set_debug_logger(GL *gl, struct mp_log *log)
{
- if (gl->DebugMessageCallback) {
- if (log) {
- gl->DebugMessageCallback(gl_debug_cb, log);
- } else {
- gl->DebugMessageCallback(NULL, NULL);
- }
- }
+ if (gl->DebugMessageCallback)
+ gl->DebugMessageCallback(log ? gl_debug_cb : NULL, log);
}
#define SC_ENTRIES 32