Sanity check that ipc callback exists

This commit is contained in:
ImVexed 2019-10-09 01:52:02 -05:00
parent 4e8857a7fb
commit 61fae01bfb
1 changed files with 5 additions and 1 deletions

View File

@ -167,7 +167,11 @@ func (w *Window) ipcCallback(ctx JSContextRef, functin JSObjectRef, thisObject J
name := fromJSString(jsProp)
f := w.callbacks[name]
f, ok := w.callbacks[name]
if !ok {
return JSValueMakeNull(ctx)
}
params := make([]reflect.Value, argumentCount)