mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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")
|
return nil, errors.New("metal: CAMetalLayer construction failed")
|
||||||
}
|
}
|
||||||
queue := C.newCommandQueue(dev)
|
queue := C.newCommandQueue(dev)
|
||||||
if layer == 0 {
|
if queue == 0 {
|
||||||
C.CFRelease(dev)
|
C.CFRelease(dev)
|
||||||
C.CFRelease(layer)
|
C.CFRelease(layer)
|
||||||
return nil, errors.New("metal: [MTLDevice newCommandQueue] failed")
|
return nil, errors.New("metal: [MTLDevice newCommandQueue] failed")
|
||||||
|
|||||||
Reference in New Issue
Block a user