aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 68d3af6074..a5b48a5d5e 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -276,10 +276,9 @@ static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nres
#endif
}
const char *error = lua_tostring(lstate, -1);
-
loop_schedule_deferred(&main_loop,
event_create(nlua_luv_error_event,
- xstrdup(error),
+ error != NULL ? xstrdup(error) : NULL,
(void *)(intptr_t)(is_callback
? kThreadCallback
: kThread)));