Skip to content

Commit 97c0dee

Browse files
committed
Catch nil signal on window close
Fixes fyne-io/fyne#4074
1 parent e8b2022 commit 97c0dee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: systray_unix.go

+4
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ func stayRegistered() {
265265
for {
266266
select {
267267
case sig := <-sc:
268+
if sig == nil {
269+
return // We get a nil signal when closing the window.
270+
}
271+
268272
// sig.Body has the args, which are [name old_owner new_owner]
269273
if sig.Body[2] != "" {
270274
register()

0 commit comments

Comments
 (0)