diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c index d309347fb2..9a8378d003 100644 --- a/src/gpu/d3d12/SDL_gpu_d3d12.c +++ b/src/gpu/d3d12/SDL_gpu_d3d12.c @@ -3454,7 +3454,9 @@ static SDL_GPUTexture *D3D12_CreateTexture( // Copy properties so we don't lose information when the client destroys them container->header.info = *createinfo; container->header.info.props = SDL_CreateProperties(); - SDL_CopyProperties(createinfo->props, container->header.info.props); + if (createinfo->props) { + SDL_CopyProperties(createinfo->props, container->header.info.props); + } container->textureCapacity = 1; container->textureCount = 1; diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m index bc712ad9e1..75738dcbcf 100644 --- a/src/gpu/metal/SDL_gpu_metal.m +++ b/src/gpu/metal/SDL_gpu_metal.m @@ -1508,7 +1508,9 @@ static SDL_GPUTexture *METAL_CreateTexture( // Copy properties so we don't lose information when the client destroys them container->header.info = *createinfo; container->header.info.props = SDL_CreateProperties(); - SDL_CopyProperties(createinfo->props, container->header.info.props); + if (createinfo->props) { + SDL_CopyProperties(createinfo->props, container->header.info.props); + } container->activeTexture = texture; container->textureCapacity = 1; diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c index 5a7c9b714c..90b1b17bec 100644 --- a/src/gpu/vulkan/SDL_gpu_vulkan.c +++ b/src/gpu/vulkan/SDL_gpu_vulkan.c @@ -6750,7 +6750,9 @@ static SDL_GPUTexture *VULKAN_CreateTexture( // Copy properties so we don't lose information when the client destroys them container->header.info = *createinfo; container->header.info.props = SDL_CreateProperties(); - SDL_CopyProperties(createinfo->props, container->header.info.props); + if (createinfo->props) { + SDL_CopyProperties(createinfo->props, container->header.info.props); + } container->canBeCycled = true; container->activeTexture = texture;