mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +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() {
|
||||
C.gio_clearCurrentContext()
|
||||
C.CFRelease(c.ctx)
|
||||
c.ctx = 0
|
||||
if c.ctx != 0 {
|
||||
C.gio_clearCurrentContext()
|
||||
C.CFRelease(c.ctx)
|
||||
c.ctx = 0
|
||||
}
|
||||
}
|
||||
|
||||
func (c *context) Present() error {
|
||||
|
||||
Reference in New Issue
Block a user