sokoke_js_script_eval should not crash when js_message is NULL

This commit is contained in:
Paweł Forysiuk 2012-09-17 17:04:31 +02:00 committed by Christian Dywan
parent d88b9776f2
commit 00bd3f0818

View 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;