forked from joejulian/gio
app: [macOS] correct error handling for newMtlContext
Fixes: https://todo.sr.ht/~eliasnaur/gio/632 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ func newMtlContext(w *window) (*mtlContext, error) {
|
||||
return nil, errors.New("metal: CAMetalLayer construction failed")
|
||||
}
|
||||
queue := C.newCommandQueue(dev)
|
||||
if layer == 0 {
|
||||
if queue == 0 {
|
||||
C.CFRelease(dev)
|
||||
C.CFRelease(layer)
|
||||
return nil, errors.New("metal: [MTLDevice newCommandQueue] failed")
|
||||
|
||||
Reference in New Issue
Block a user