mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +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.
|
// Decrement window counter.
|
||||||
windowCounter <- -1
|
windowCounter <- -1
|
||||||
}()
|
}()
|
||||||
|
defer d.destroy()
|
||||||
|
defer w.destroy()
|
||||||
w.w.SetDriver(w)
|
w.w.SetDriver(w)
|
||||||
if err := w.loop(); err != nil {
|
if err := w.loop(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
w.destroy()
|
|
||||||
d.destroy()
|
|
||||||
}()
|
}()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user