From b9cdc9d4b0c115f51253b16665240577b1f81e5e Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 28 Jun 2016 13:02:32 +1000 Subject: [PATCH] glcontext: correct precondition for get_gl_version The intention was to assert if both maj and min were NULL (as there would be no point calling the function). Instead if either maj or min were NULL, the assert would occur. Fix that. --- gst-libs/gst/gl/gstglcontext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 3ad5a4c..d222e08 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -537,9 +537,9 @@ GstGLAPI gst_gl_context_get_current_gl_api (GstGLPlatform platform, guint * major, guint * minor) { - const GLubyte *(GSTGLAPI *GetString) (GLenum name); + const GLubyte *(GSTGLAPI * GetString) (GLenum name); #if GST_GL_HAVE_OPENGL - void (GSTGLAPI *GetIntegerv) (GLenum name, GLuint * n); + void (GSTGLAPI * GetIntegerv) (GLenum name, GLuint * n); #endif const gchar *version; gint maj, min, n; @@ -1513,7 +1513,7 @@ void gst_gl_context_get_gl_version (GstGLContext * context, gint * maj, gint * min) { g_return_if_fail (GST_IS_GL_CONTEXT (context)); - g_return_if_fail (maj != NULL && min != NULL); + g_return_if_fail (!(maj == NULL && min == NULL)); if (maj) *maj = context->priv->gl_major; -- 2.7.4