jchv/go-webview2

panic when calling PutDefaultBackgroundColor

D4v1dW3bb opened this issue · 0 comments

when running this code:

c := edge.COREWEBVIEW2_COLOR{
		A: 100,
		R: 255,
		G: 255,
		B: 255,
	}
wv.Controler2.PutDefaultBackgroundColor(c)

i get:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x3963a4]

goroutine 1 [running, locked to thread]:
github.com/jchv/go-webview2/pkg/edge.(*ICoreWebView2Controller2).PutDefaultBackgroundColor(0xc00001e060, {0x64, 0xff, 0xff, 0xff})
        F:/........./go-webview2/pkg/edge/ICoreWebView2Controller2.go:65 +0x44