Double check meta values before trying to convert to a long
This commit is contained in:
parent
2f18605656
commit
88778948ea
1 changed files with 1 additions and 1 deletions
|
@ -590,7 +590,7 @@ katze_item_get_meta_integer (KatzeItem* item,
|
||||||
if (g_str_has_prefix (key, "midori:"))
|
if (g_str_has_prefix (key, "midori:"))
|
||||||
key = &key[7];
|
key = &key[7];
|
||||||
if (g_hash_table_lookup_extended (item->metadata, key, NULL, &value))
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue