mirror of https://github.com/ImVexed/muon.git
Sanity check that ipc callback exists
This commit is contained in:
parent
4e8857a7fb
commit
61fae01bfb
6
muon.go
6
muon.go
|
@ -167,7 +167,11 @@ func (w *Window) ipcCallback(ctx JSContextRef, functin JSObjectRef, thisObject J
|
||||||
|
|
||||||
name := fromJSString(jsProp)
|
name := fromJSString(jsProp)
|
||||||
|
|
||||||
f := w.callbacks[name]
|
f, ok := w.callbacks[name]
|
||||||
|
|
||||||
|
if !ok {
|
||||||
|
return JSValueMakeNull(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
params := make([]reflect.Value, argumentCount)
|
params := make([]reflect.Value, argumentCount)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue