ges: Assert if an asset is not in the global hashtable
authorThibault Saunier <tsaunier@gnome.org>
Sat, 10 May 2014 20:38:21 +0000 (22:38 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Sat, 10 May 2014 20:38:21 +0000 (22:38 +0200)
COVERITY CID 1151679

ges/ges-asset.c

index 571a105..4128dbf 100644 (file)
@@ -637,8 +637,8 @@ ges_asset_set_id (GESAsset * asset, const gchar * id)
   entries = g_hash_table_lookup (type_entries_table,
       _extractable_type_name (asset->priv->extractable_type));
 
-  g_hash_table_lookup_extended (entries, priv->id, &orig_id,
-      (gpointer *) & entry);
+  g_return_if_fail (g_hash_table_lookup_extended (entries, priv->id, &orig_id,
+          (gpointer *) & entry));
 
   g_hash_table_steal (entries, priv->id);
   g_hash_table_insert (entries, g_strdup (id), entry);