diff options
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/gl/gstgldebug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstgldebug.c b/gst-libs/gst/gl/gstgldebug.c index a228e26ce..46833a7fa 100644 --- a/gst-libs/gst/gl/gstgldebug.c +++ b/gst-libs/gst/gl/gstgldebug.c @@ -204,9 +204,15 @@ gst_gl_insert_debug_marker (GstGLContext * context, const gchar * format, ...) va_list args; va_start (args, format); - len = g_vasprintf (&string, format, args); + len = gst_info_vasprintf (&string, format, args); va_end (args); + /* gst_info_vasprintf() returns -1 on error, the various debug marker + * functions take len=-1 to mean null terminated */ + if (len < 0 || string == NULL) + /* no debug output */ + return; + if (gl->DebugMessageInsert) gl->DebugMessageInsert (GL_DEBUG_SOURCE_THIRD_PARTY, GL_DEBUG_TYPE_MARKER, 0, GL_DEBUG_SEVERITY_LOW, (gsize) len, string); |