Double check meta values before trying to convert to a long

This commit is contained in:
Christian Dywan 2009-11-30 19:52:42 +01:00
parent 2f18605656
commit 88778948ea

View file

@ -590,7 +590,7 @@ katze_item_get_meta_integer (KatzeItem* item,
if (g_str_has_prefix (key, "midori:"))
key = &key[7];
if (g_hash_table_lookup_extended (item->metadata, key, NULL, &value))
return g_ascii_strtoll (value, NULL, 0);
return value ? g_ascii_strtoll (value, NULL, 0) : -1;
return -1;
}