From 5b13dca0ce73159f21aef67335039c15d09f3553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 27 Nov 2014 18:09:14 +0100 Subject: [PATCH] glmemory: Handle failure of memory allocation gracefully --- gst-libs/gst/gl/gstglmemory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index cc5b6e162d..ab4e0d8656 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -1172,6 +1172,8 @@ gst_gl_memory_setup_buffer (GstGLContext * context, GstVideoInfo * info, for (i = 0; i < n_mem; i++) { gl_mem[i] = (GstGLMemory *) gst_gl_memory_alloc (context, info, i); + if (gl_mem[i] == NULL) + return FALSE; gst_buffer_append_memory (buffer, (GstMemory *) gl_mem[i]); }