fix null reference

submit_rewrite
cosmonaut 2020-12-27 15:38:58 -08:00
parent 2a4811315b
commit 39ec13501a
1 changed files with 6 additions and 6 deletions

View File

@ -5022,13 +5022,13 @@ static void VULKAN_SetVertexSamplers(
VulkanGraphicsPipeline *graphicsPipeline = (VulkanGraphicsPipeline*) pipeline;
SamplerDescriptorSetData vertexSamplerDescriptorSetData;
samplerCount = graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache->samplerBindingCount;
if (samplerCount == 0)
if (graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache == NULL)
{
return;
}
samplerCount = graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache->samplerBindingCount;
for (i = 0; i < samplerCount; i += 1)
{
currentTexture = (VulkanTexture*) pTextures[i];
@ -5057,13 +5057,13 @@ static void VULKAN_SetFragmentSamplers(
VulkanGraphicsPipeline *graphicsPipeline = (VulkanGraphicsPipeline*) pipeline;
SamplerDescriptorSetData fragmentSamplerDescriptorSetData;
samplerCount = graphicsPipeline->pipelineLayout->fragmentSamplerDescriptorSetCache->samplerBindingCount;
if (samplerCount == 0)
if (graphicsPipeline->pipelineLayout->vertexSamplerDescriptorSetCache == NULL)
{
return;
}
samplerCount = graphicsPipeline->pipelineLayout->fragmentSamplerDescriptorSetCache->samplerBindingCount;
for (i = 0; i < samplerCount; i += 1)
{
currentTexture = (VulkanTexture*) pTextures[i];