From 27848bd2530ec570980e470bd3e01ef9e14ed5b0 Mon Sep 17 00:00:00 2001 From: jackun Date: Wed, 12 Feb 2020 19:58:01 +0200 Subject: [PATCH] Don't crash if there's nothing to draw --- src/overlay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/overlay.cpp b/src/overlay.cpp index 9e7775e7..e9263ce3 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -2242,8 +2242,10 @@ static VkResult overlay_QueuePresentKHR( * wait on them as well, we can just wait on the overlay submission * semaphore. */ - present_info.pWaitSemaphores = &draw->semaphore; - present_info.waitSemaphoreCount = 1; + if (draw) { + present_info.pWaitSemaphores = &draw->semaphore; + present_info.waitSemaphoreCount = 1; + } uint64_t ts0 = os_time_get(); VkResult chain_result = queue_data->device->vtable.QueuePresentKHR(queue, &present_info);