multiqueue: Fix possible NULL pointer dereferencing

In the hotdoc inspector for example, pads are instantiated with
g_object_new, other code paths to get/set properties already make
that check.

And update doc cache
This commit is contained in:
Thibault Saunier 2019-07-02 17:14:50 -04:00
parent e5a3f12ff2
commit 7a2d32abda
2 changed files with 23 additions and 1 deletions

View file

@ -2017,6 +2017,27 @@
"src_%%u": {
"caps": "ANY",
"direction": "src",
"object-type": {
"hierarchy": [
"GstMultiQueuePad",
"GstPad",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"properties": {
"group-id": {
"blurb": "Group to which this pad belongs",
"construct": false,
"construct-only": false,
"default": "0",
"max": "-1",
"min": "0",
"type-name": "guint",
"writable": true
}
}
},
"presence": "sometimes"
}
},

View file

@ -394,7 +394,8 @@ gst_multiqueue_pad_finalize (GObject * object)
{
GstMultiQueuePad *pad = GST_MULTIQUEUE_PAD (object);
gst_single_queue_unref (pad->sq);
if (pad->sq)
gst_single_queue_unref (pad->sq);
G_OBJECT_CLASS (gst_multiqueue_pad_parent_class)->finalize (object);
}