app/internal/gpu: don't release the context when New fails

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-28 15:14:45 +01:00
parent c49f214f4a
commit 809b4a2cf9
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -290,6 +290,9 @@ func (w *Window) run(opts *window.Options) {
ctx, err = w.driver.NewContext()
if err == nil {
w.gpu, err = gpu.New(ctx)
if err != nil {
ctx.Release()
}
}
}
var frame *op.Ops