mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
gltestsrc: Fix potential NULL pointer dereference if we fail without GError
Which can happen here if we just propagate an error that happened elsewhere, e.g. FBO failed. CID 1364604
This commit is contained in:
parent
0e2f93589d
commit
cb0dba6188
1 changed files with 7 additions and 3 deletions
|
@ -675,9 +675,13 @@ unsupported_gl_api:
|
|||
}
|
||||
context_error:
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
if (error) {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||
(NULL));
|
||||
g_clear_error (&error);
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), (NULL));
|
||||
}
|
||||
if (src->context)
|
||||
gst_object_unref (src->context);
|
||||
src->context = NULL;
|
||||
|
|
Loading…
Reference in a new issue