Browse Source

Put fix in correct position

This fixes a mismerge by @elmindreda in
65748fb8f316384cda39583a489c39ae80124305.

(cherry picked from commit efda4afb495be4779c152a96f7b3f52c54cbff32)
Camilla Löwy 6 years ago
parent
commit
116f4c831d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/triangle-vulkan.c

+ 1 - 1
tests/triangle-vulkan.c

@@ -2118,7 +2118,6 @@ static void demo_cleanup(struct demo *demo) {
 
     if (demo->setup_cmd) {
         vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
-        demo->setup_cmd = VK_NULL_HANDLE;
     }
     vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
     vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);
@@ -2178,6 +2177,7 @@ static void demo_resize(struct demo *demo) {
 
     if (demo->setup_cmd) {
         vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->setup_cmd);
+        demo->setup_cmd = VK_NULL_HANDLE;
     }
     vkFreeCommandBuffers(demo->device, demo->cmd_pool, 1, &demo->draw_cmd);
     vkDestroyCommandPool(demo->device, demo->cmd_pool, NULL);