From 00bd3f08185f815c4d1419e5a6f6d86928f7fd40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Forysiuk?= Date: Mon, 17 Sep 2012 17:04:31 +0200 Subject: [PATCH] sokoke_js_script_eval should not crash when js_message is NULL --- midori/sokoke.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5