app,internal/vk: [Vulkan] skip frame with stale window dimensions

While here, add a missing nil check.

Updates gio#280

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-09-30 17:21:52 +02:00
parent 9e8fe5305b
commit 6c1f9c19f5
6 changed files with 56 additions and 15 deletions
+3 -1
View File
@@ -57,7 +57,9 @@ func (c *wlVkContext) API() gpu.API {
func (c *wlVkContext) Release() {
c.ctx.release()
vk.DestroySurface(c.inst, c.surf)
if c.surf != 0 {
vk.DestroySurface(c.inst, c.surf)
}
vk.DestroyInstance(c.inst)
*c = wlVkContext{}
}