validate-scenario: Fix NULL pointer usage

for good this time ...

CID #1415570
This commit is contained in:
Edward Hervey 2017-07-26 15:22:49 +02:00 committed by Edward Hervey
parent 1b48ffdff5
commit 40eb48d21f

View file

@ -1761,13 +1761,13 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action,
if (!add_to_lists)
return res;
if (str_playback_time == NULL) {
if (str_playback_time == NULL && priv != NULL) {
GstValidateActionType *type = _find_action_type (action->type);
gboolean can_execute_on_addition =
type->flags & GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION
&& !GST_CLOCK_TIME_IS_VALID (action->playback_time);
if (priv && priv->needs_parsing)
if (priv->needs_parsing)
can_execute_on_addition = FALSE;
if (can_execute_on_addition) {
@ -1789,7 +1789,7 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action,
action);
SCENARIO_UNLOCK (scenario);
} else if (priv) {
} else {
priv->actions = g_list_append (priv->actions, action);
}
}