From 88778948ead188a2c731404b2796f8b084b762e1 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 30 Nov 2009 19:52:42 +0100 Subject: [PATCH] Double check meta values before trying to convert to a long --- katze/katze-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/katze/katze-item.c b/katze/katze-item.c index a63afd45..80f835eb 100644 --- a/katze/katze-item.c +++ b/katze/katze-item.c @@ -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; } -- 2.39.5