From 2db60e5ab009f11b3b63616d88c2fc54c1f28b1c Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Thu, 24 Feb 2022 12:38:18 -0800 Subject: [PATCH] fix null reference --- src/Refresh_Driver_Vulkan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 139720f..8c95633 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -7448,9 +7448,12 @@ static VkFramebuffer VULKAN_INTERNAL_FetchFramebuffer( renderTarget->view ); - hash.colorMultiSampleAttachmentViews[i] = ( - renderTarget->multisampleTexture->view - ); + if (renderTarget->multisampleTexture != NULL) + { + hash.colorMultiSampleAttachmentViews[i] = ( + renderTarget->multisampleTexture->view + ); + } } if (depthStencilAttachmentInfo == NULL) @@ -7496,7 +7499,7 @@ static VkFramebuffer VULKAN_INTERNAL_FetchFramebuffer( attachmentCount += 1; - if (renderTarget->multisampleCount > VK_SAMPLE_COUNT_1_BIT) + if (renderTarget->multisampleTexture != NULL) { imageViewAttachments[attachmentCount] = renderTarget->multisampleTexture->view;