summaryrefslogtreecommitdiff
path: root/src/scripts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts.c')
-rw-r--r--src/scripts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scripts.c b/src/scripts.c
index dd0ae0db..120b1f9c 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -1557,7 +1557,10 @@ scripts_emit(ScriptSignal *sig) {
val[i++] = sig->jsobj;
}
for (int j=0; j<sig->numobj; j++) {
- val[i++] = make_object(m_global_context, G_OBJECT(sig->objects[j]));
+ if (sig->objects[j] != NULL)
+ val[i++] = make_object(m_global_context, G_OBJECT(sig->objects[j]));
+ else
+ val[i++] = JSValueMakeNull(m_global_context);
}
JSValueRef vson = js_json_to_value(m_global_context, sig->json);
val[i++] = vson == NULL ? JSValueMakeNull(m_global_context) : vson;