Skip to content

Commit 88df1e0

Browse files
authored
Merge pull request #55 from Jacalz/fix-shutdown-crash
Catch nil signal on window close
2 parents e8b2022 + 97c0dee commit 88df1e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)