mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
app/internal/window: defer window and display destructors
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -193,12 +193,12 @@ func newWLWindow(window Callbacks, opts *Options) error {
|
||||
// Decrement window counter.
|
||||
windowCounter <- -1
|
||||
}()
|
||||
defer d.destroy()
|
||||
defer w.destroy()
|
||||
w.w.SetDriver(w)
|
||||
if err := w.loop(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
w.destroy()
|
||||
d.destroy()
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user