In VuklanManager make sure we have a valid semaphore context before destroying it.

If errors occured during finishFrame that caused us to not have a
semaphore or possibly destroy the semaphore early we will end up
with a null mDestroySemaphoreContext in swapBuffers which we tried
to destroy unconditionally.

I haven't repro'd the connected bug, but based on the crash stack
this seems like the likely cause.

Test: manual code inspection and build.
Bug: 191950033
Change-Id: I0fbd33edff3552b91b980da9e3b2c45bc52a2dd0
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index f701491..9e8a1e1 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -579,7 +579,9 @@
         std::lock_guard<std::mutex> lock(mGraphicsQueueMutex);
         mQueueWaitIdle(mGraphicsQueue);
     }
-    destroy_semaphore(mDestroySemaphoreContext);
+    if (mDestroySemaphoreContext) {
+        destroy_semaphore(mDestroySemaphoreContext);
+    }
 
     surface->presentCurrentBuffer(dirtyRect, fenceFd);
     mSwapSemaphore = VK_NULL_HANDLE;