mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
ges: Do not clear potentially NULL errors
And avoid dereferencing NULL errors
This commit is contained in:
parent
663824d20f
commit
d114cc60bd
2 changed files with 8 additions and 3 deletions
|
@ -763,6 +763,7 @@ ges_project_create_asset_sync (GESProject * project, const gchar * id,
|
|||
if (possible_id == NULL)
|
||||
return NULL;
|
||||
|
||||
if (error)
|
||||
g_clear_error (error);
|
||||
|
||||
id = possible_id;
|
||||
|
|
|
@ -185,12 +185,16 @@ _ges_get_asset_from_timeline (GESTimeline * timeline, GType type,
|
|||
{
|
||||
GESAsset *asset;
|
||||
GESProject *project = ges_timeline_get_project (timeline);
|
||||
GError *err = NULL;
|
||||
|
||||
asset = ges_project_create_asset_sync (project, id, type, error);
|
||||
asset = ges_project_create_asset_sync (project, id, type, &err);
|
||||
|
||||
if (err)
|
||||
g_propagate_error (error, err);
|
||||
if (!asset || (error && *error)) {
|
||||
GST_ERROR
|
||||
("There was an error requesting the asset with id %s and type %s (%s)",
|
||||
id, g_type_name (type), (*error) ? (*error)->message : "unknown");
|
||||
id, g_type_name (type), error ? (*error)->message : "unknown");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue