From 316b7a1afb84a5dfeaed886a585669b4d549c9b7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 11 Apr 2011 17:49:10 -0400 Subject: [PATCH] Make hb_language_from_string("") return NULL language --- src/hb-language.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-language.c b/src/hb-language.c index 2aabada8f..7c2295ac9 100644 --- a/src/hb-language.c +++ b/src/hb-language.c @@ -85,7 +85,7 @@ hb_language_from_string (const char *str) /* TODO Use a hash table or something */ - if (!str) + if (!str || !*str) return NULL; for (i = 0; i < num_langs; i++)