diff --git a/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp b/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp index 680edf32318..8f2222a9764 100644 --- a/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp +++ b/RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp @@ -690,8 +690,11 @@ namespace Ogre //----------------------------------------------------------------------------------- void VulkanRenderPassDescriptor::notifySwapchainCreated( VulkanWindow *window ) { - if( mNumColourEntries > 0 && mColour[0].texture->isRenderWindowSpecific() && - mColour[0].texture == window->getTexture() ) + if( mNumColourEntries > 0 && + ( ( mColour[0].texture && mColour[0].texture->isRenderWindowSpecific() && + mColour[0].texture == window->getTexture() ) || + ( mColour[0].resolveTexture && mColour[0].resolveTexture->isRenderWindowSpecific() && + mColour[0].resolveTexture == window->getTexture() ) ) ) { entriesModified( RenderPassDescriptor::All ); } @@ -699,8 +702,11 @@ namespace Ogre //----------------------------------------------------------------------------------- void VulkanRenderPassDescriptor::notifySwapchainDestroyed( VulkanWindow *window ) { - if( mNumColourEntries > 0 && mColour[0].texture->isRenderWindowSpecific() && - mColour[0].texture == window->getTexture() ) + if( mNumColourEntries > 0 && + ( ( mColour[0].texture && mColour[0].texture->isRenderWindowSpecific() && + mColour[0].texture == window->getTexture() ) || + ( mColour[0].resolveTexture && mColour[0].resolveTexture->isRenderWindowSpecific() && + mColour[0].resolveTexture == window->getTexture() ) ) ) { releaseFbo(); }