]> spindle.queued.net Git - midori/commitdiff
sokoke_js_script_eval should not crash when js_message is NULL
authorPaweł Forysiuk <tuxator@o2.pl>
Mon, 17 Sep 2012 15:04:31 +0000 (17:04 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 17 Sep 2012 22:33:07 +0000 (00:33 +0200)
midori/sokoke.c

index 678416845f00878f0d61c1d9b37c241b0aed5010..5ef53d4ecf701603ddecf103327254b4dfb9e457 100644 (file)
@@ -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;