From: Paweł Forysiuk Date: Mon, 17 Sep 2012 15:04:31 +0000 (+0200) Subject: sokoke_js_script_eval should not crash when js_message is NULL X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00bd3f08185f815c4d1419e5a6f6d86928f7fd40;p=midori sokoke_js_script_eval should not crash when js_message is NULL --- diff --git a/midori/sokoke.c b/midori/sokoke.c index 67841684..5ef53d4e 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -85,6 +85,8 @@ sokoke_js_script_eval (JSContextRef js_context, { JSStringRef js_message = JSValueToStringCopy (js_context, js_exception, NULL); + g_return_val_if_fail (js_message != NULL, NULL); + value = sokoke_js_string_utf8 (js_message); if (exception) *exception = value;