From c65e13023779c4f16445e760e4f5171457486f12 Mon Sep 17 00:00:00 2001 From: Harry Fox <1254033+hfoxy@users.noreply.github.com> Date: Thu, 2 May 2024 12:57:51 +0100 Subject: [PATCH] add missing map init from `application.init()` (#3426) * add missing map init from `application.init()` * add changelog entry for #3426 --------- Co-authored-by: Lea Anthony --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/application.go | 1 + 2 files changed, 2 insertions(+) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 77377d2924e..fc8bc5f0655 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix the import paths of model files in JS code produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) - Fix drag-n-drop on some linux distros by [@abichinger](https://github.com/abichinger) in [#3346](https://github.com/wailsapp/wails/pull/3346) - Fix missing task for macOS when using `wails3 task dev` by [@hfoxy](https://github.com/hfoxy) in [#3417](https://github.com/wailsapp/wails/pull/3417) +- Fix registering events causing a nil map assignment by [@hfoxy](https://github.com/hfoxy) in [#3426](https://github.com/wailsapp/wails/pull/3426) - Fix unmarshaling of bound method parameters by [@fbbdev](https://github.com/fbbdev) in [#3431](https://github.com/wailsapp/wails/pull/3431) - Fix handling of multiple return values from bound methods by [@fbbdev](https://github.com/fbbdev) in [#3431](https://github.com/wailsapp/wails/pull/3431) diff --git a/v3/pkg/application/application.go b/v3/pkg/application/application.go index dbd71674389..e3b3705f804 100644 --- a/v3/pkg/application/application.go +++ b/v3/pkg/application/application.go @@ -333,6 +333,7 @@ type App struct { } func (a *App) init() { + a.applicationEventHooks = make(map[uint][]*eventHook) a.applicationEventListeners = make(map[uint][]*EventListener) a.windows = make(map[uint]Window) a.systemTrays = make(map[uint]*SystemTray)