mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app/internal/wm: [iOS] don't destroy context when MakeCurrent fails
The caller should ensure the proper destruction. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -93,8 +93,6 @@ func (c *context) Unlock() {}
|
|||||||
|
|
||||||
func (c *context) MakeCurrent() error {
|
func (c *context) MakeCurrent() error {
|
||||||
if C.gio_makeCurrent(c.ctx) == 0 {
|
if C.gio_makeCurrent(c.ctx) == 0 {
|
||||||
C.CFRelease(c.ctx)
|
|
||||||
c.ctx = 0
|
|
||||||
return errors.New("[EAGLContext setCurrentContext] failed")
|
return errors.New("[EAGLContext setCurrentContext] failed")
|
||||||
}
|
}
|
||||||
if !c.init {
|
if !c.init {
|
||||||
|
|||||||
Reference in New Issue
Block a user