Added missing null pointer check on pDepthStencilResolveAttachment

According to the spec:
"If pDepthStencilResolveAttachment is NULL, or if its attachment
 index is VK_ATTACHMENT_UNUSED, it indicates that no depth/stencil
 resolve attachment will be used in the subpass."

Tests: dEQP-VK.pipeline.monolithic.multisample.misc.multi_subpass.r8g8b8a8_unorm_r16g16b16a16_sfloat_*
Bug: b/242205326
Change-Id: I57627d5a65bbeda0d2eef83483ee374e10db7d68
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/67608
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkFramebuffer.cpp b/src/Vulkan/VkFramebuffer.cpp
index b5e41ea..3d1ed92 100644
--- a/src/Vulkan/VkFramebuffer.cpp
+++ b/src/Vulkan/VkFramebuffer.cpp
@@ -195,7 +195,7 @@
 	{
 		VkSubpassDescriptionDepthStencilResolve dsResolve = renderPass->getSubpassDepthStencilResolve(subpassIndex);
 		uint32_t depthStencilAttachment = subpass.pDepthStencilAttachment->attachment;
-		if(depthStencilAttachment != VK_ATTACHMENT_UNUSED)
+		if((depthStencilAttachment != VK_ATTACHMENT_UNUSED) && (dsResolve.pDepthStencilResolveAttachment != nullptr))
 		{
 			ImageView *imageView = attachments[depthStencilAttachment];
 			imageView->resolveDepthStencil(attachments[dsResolve.pDepthStencilResolveAttachment->attachment],