mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-24 03:58:28 +00:00
GPU: Don't pass null properties to SDL_CopyProperties()
This commit is contained in:

committed by
Sam Lantinga

parent
8ad64aba1b
commit
300013cea7
@@ -3454,7 +3454,9 @@ static SDL_GPUTexture *D3D12_CreateTexture(
|
|||||||
// Copy properties so we don't lose information when the client destroys them
|
// Copy properties so we don't lose information when the client destroys them
|
||||||
container->header.info = *createinfo;
|
container->header.info = *createinfo;
|
||||||
container->header.info.props = SDL_CreateProperties();
|
container->header.info.props = SDL_CreateProperties();
|
||||||
|
if (createinfo->props) {
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
||||||
|
}
|
||||||
|
|
||||||
container->textureCapacity = 1;
|
container->textureCapacity = 1;
|
||||||
container->textureCount = 1;
|
container->textureCount = 1;
|
||||||
|
@@ -1508,7 +1508,9 @@ static SDL_GPUTexture *METAL_CreateTexture(
|
|||||||
// Copy properties so we don't lose information when the client destroys them
|
// Copy properties so we don't lose information when the client destroys them
|
||||||
container->header.info = *createinfo;
|
container->header.info = *createinfo;
|
||||||
container->header.info.props = SDL_CreateProperties();
|
container->header.info.props = SDL_CreateProperties();
|
||||||
|
if (createinfo->props) {
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
||||||
|
}
|
||||||
|
|
||||||
container->activeTexture = texture;
|
container->activeTexture = texture;
|
||||||
container->textureCapacity = 1;
|
container->textureCapacity = 1;
|
||||||
|
@@ -6750,7 +6750,9 @@ static SDL_GPUTexture *VULKAN_CreateTexture(
|
|||||||
// Copy properties so we don't lose information when the client destroys them
|
// Copy properties so we don't lose information when the client destroys them
|
||||||
container->header.info = *createinfo;
|
container->header.info = *createinfo;
|
||||||
container->header.info.props = SDL_CreateProperties();
|
container->header.info.props = SDL_CreateProperties();
|
||||||
|
if (createinfo->props) {
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
||||||
|
}
|
||||||
|
|
||||||
container->canBeCycled = true;
|
container->canBeCycled = true;
|
||||||
container->activeTexture = texture;
|
container->activeTexture = texture;
|
||||||
|
Reference in New Issue
Block a user