summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-05-08 16:00:37 +0200
committerportix <portix@gmx.net>2013-05-08 16:00:37 +0200
commit9acf73f81af08ee4c05a10f6f72ee8b73ac75706 (patch)
tree9edeec1bdf3e9c9d8f0508acf9ccc371fedbda33 /src
parentfc97effc5178dd5c0e4d1faf7a5031bdda00ed67 (diff)
downloaddwb-9acf73f81af08ee4c05a10f6f72ee8b73ac75706.zip
Fixing segfault if quit is called in execute()
Diffstat (limited to 'src')
-rw-r--r--src/scripts.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/scripts.c b/src/scripts.c
index 14f80904..b3fc59bb 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -1460,9 +1460,6 @@ scripts_eval_key(KeyMap *m, Arg *arg)
if (! (m->map->prop & CP_OVERRIDE))
CLEAR_COMMAND_TEXT();
- if (!TRY_CONTEXT_LOCK)
- return STATUS_ERROR;
-
if (s_global_context != NULL)
{
if (arg->p == NULL)
@@ -1474,7 +1471,6 @@ scripts_eval_key(KeyMap *m, Arg *arg)
call_as_function_debug(s_global_context, arg->js, arg->js, 1, argv);
}
- CONTEXT_UNLOCK;
g_free(json);
return STATUS_OK;
@@ -1677,6 +1673,8 @@ global_execute(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, s
status = dwb_parse_command_line(command);
g_free(command);
}
+ if (status == STATUS_END)
+ exit(0);
return JSValueMakeBoolean(ctx, status == STATUS_OK);
}/*}}}*/