summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2013-03-26 14:37:10 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2013-04-16 16:08:51 -0300
commitb27a8c0fc4eaf251ad355db8ef3a53100c5ae735 (patch)
tree7aa1887cf627f82d4ca40b2badc10ef0c57d0b75
parent019204ec938f2492e1f7d75e3624556e9e9ed9bd (diff)
downloadgstreamer-plugins-bad-b27a8c0fc4eaf251ad355db8ef3a53100c5ae735.tar.gz
eglglessink: eagl: avoid segfault when extensions string is null
Do not try to get/print the extensions when the extensions string from GL is null
-rw-r--r--ext/eglgles/gstegladaptation_eagl.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/eglgles/gstegladaptation_eagl.m b/ext/eglgles/gstegladaptation_eagl.m
index 91857921c..867071436 100644
--- a/ext/eglgles/gstegladaptation_eagl.m
+++ b/ext/eglgles/gstegladaptation_eagl.m
@@ -259,7 +259,11 @@ void
gst_egl_adaptation_init_egl_exts (GstEglAdaptationContext * ctx)
{
const gchar *extensions = (const gchar *) glGetString(GL_EXTENSIONS);
- NSString *extensionsString = [NSString stringWithCString:extensions encoding: NSASCIIStringEncoding];
+ NSString *extensionsString = NULL;
+
+ if (extensions) {
+ extensionsString= [NSString stringWithCString:extensions encoding: NSASCIIStringEncoding];
+ }
GST_DEBUG_OBJECT (ctx->element, "Available GL extensions: %s\n",
GST_STR_NULL ([extensionsString UTF8String]));