From 42cbb98eb53b2c181a28022e493f14ecaf79a28d Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 10 Oct 2023 20:23:11 +1100 Subject: [PATCH] Do not `Eval` before webview created --- pkg/edge/chromium.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/edge/chromium.go b/pkg/edge/chromium.go index 5c241ad..0517186 100644 --- a/pkg/edge/chromium.go +++ b/pkg/edge/chromium.go @@ -195,6 +195,10 @@ func (e *Chromium) Init(script string) { func (e *Chromium) Eval(script string) { + if e.webview == nil { + return + } + _script, err := windows.UTF16PtrFromString(script) if err != nil { log.Fatal(err)