mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +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,10 +58,12 @@ func (c *context) API() gpu.API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *context) Release() {
|
func (c *context) Release() {
|
||||||
|
if c.ctx != 0 {
|
||||||
C.gio_clearCurrentContext()
|
C.gio_clearCurrentContext()
|
||||||
C.CFRelease(c.ctx)
|
C.CFRelease(c.ctx)
|
||||||
c.ctx = 0
|
c.ctx = 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *context) Present() error {
|
func (c *context) Present() error {
|
||||||
// Assume the caller already locked the context.
|
// Assume the caller already locked the context.
|
||||||
|
|||||||
Reference in New Issue
Block a user