mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
validate:scenario: Avoid dereferencing NULL structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
This commit is contained in:
parent
02339bd8bb
commit
800cc245e8
1 changed files with 8 additions and 7 deletions
|
@ -509,17 +509,18 @@ gst_validate_action_new (GstValidateScenario * scenario,
|
|||
action->priv->timeout = GST_CLOCK_TIME_NONE;
|
||||
action->type = action_type->name;
|
||||
action->repeat = -1;
|
||||
gst_structure_get (structure,
|
||||
"__lineno__", G_TYPE_INT, &GST_VALIDATE_ACTION_LINENO (action),
|
||||
"__filename__", G_TYPE_STRING, &GST_VALIDATE_ACTION_FILENAME (action),
|
||||
"__debug__", G_TYPE_STRING, &GST_VALIDATE_ACTION_DEBUG (action), NULL);
|
||||
gst_structure_remove_fields (structure, "__lineno__", "__filename__",
|
||||
"__debug__", NULL);
|
||||
|
||||
g_weak_ref_set (&action->priv->scenario, scenario);
|
||||
if (structure)
|
||||
if (structure) {
|
||||
gst_structure_get (structure,
|
||||
"__lineno__", G_TYPE_INT, &GST_VALIDATE_ACTION_LINENO (action),
|
||||
"__filename__", G_TYPE_STRING, &GST_VALIDATE_ACTION_FILENAME (action),
|
||||
"__debug__", G_TYPE_STRING, &GST_VALIDATE_ACTION_DEBUG (action), NULL);
|
||||
gst_structure_remove_fields (structure, "__lineno__", "__filename__",
|
||||
"__debug__", NULL);
|
||||
action->priv->state =
|
||||
_fill_action (scenario, action, structure, add_to_lists);
|
||||
}
|
||||
|
||||
return action;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue