mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app/internal/wm: [macOS] release context only if it was created
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -58,9 +58,11 @@ func (c *context) API() gpu.API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *context) Release() {
|
func (c *context) Release() {
|
||||||
C.gio_clearCurrentContext()
|
if c.ctx != 0 {
|
||||||
C.CFRelease(c.ctx)
|
C.gio_clearCurrentContext()
|
||||||
c.ctx = 0
|
C.CFRelease(c.ctx)
|
||||||
|
c.ctx = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *context) Present() error {
|
func (c *context) Present() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user