mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
validate: Don't create scenario on a monitor which has no target
Not very probable but avoids a potential NULL pointer dereferencing. CID 1415460
This commit is contained in:
parent
6572af916b
commit
9ee7b4483c
1 changed files with 7 additions and 3 deletions
|
@ -647,9 +647,13 @@ gst_validate_pipeline_monitor_create_scenarios (GstValidateBinMonitor * monitor)
|
|||
goto done;
|
||||
}
|
||||
}
|
||||
monitor->scenario =
|
||||
gst_validate_scenario_factory_create (runner,
|
||||
GST_ELEMENT_CAST (target), scenario_v[0]);
|
||||
if (target)
|
||||
monitor->scenario =
|
||||
gst_validate_scenario_factory_create (runner,
|
||||
GST_ELEMENT_CAST (target), scenario_v[0]);
|
||||
else
|
||||
GST_INFO_OBJECT (monitor, "Not creating scenario as monitor"
|
||||
" already does not have a target.");
|
||||
g_strfreev (scenario_v);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue