From b3134e89d9f94865a047b2315c0ac09252c05efd Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 19 Jul 2017 10:17:25 -0400 Subject: [PATCH] validate: scenario: Fix running config action from the config file --- validate/gst/validate/gst-validate-scenario.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 5c521fe433..f7a1ade00e 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -1684,6 +1684,8 @@ _set_action_playback_time (GstValidateScenario * scenario, return TRUE; } +/* scenario can be NULL **only** if the action is a CONFIG action and + * add_to_lists is FALSE */ static GstValidateExecuteActionReturn _fill_action (GstValidateScenario * scenario, GstValidateAction * action, GstStructure * structure, gboolean add_to_lists) @@ -1692,7 +1694,7 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action, gboolean is_config = FALSE; GstValidateActionType *action_type; const gchar *str_playback_time = NULL; - GstValidateScenarioPrivate *priv = scenario->priv; + GstValidateScenarioPrivate *priv = scenario ? scenario->priv : NULL; GstValidateExecuteActionReturn res = GST_VALIDATE_EXECUTE_ACTION_OK; gboolean optional;