GPU: Don't pass null properties to SDL_CopyProperties()
(cherry picked from commit 300013cea7)
This commit is contained in:
1 parent
943226edc1
commit
34db21cea8
3 files changed
+9
-3
No files matched your search
@@ -3483,7 +3483,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();
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
if (createinfo->props) {
|
||||||
|
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
||||||
|
}
|
||||||
|
|
||||||
container->textureCapacity = 1;
|
container->textureCapacity = 1;
|
||||||
container->textureCount = 1;
|
container->textureCount = 1;
|
||||||
|
|||||||
@@ -1494,7 +1494,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();
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
if (createinfo->props) {
|
||||||
|
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
||||||
|
}
|
||||||
|
|
||||||
container->activeTexture = texture;
|
container->activeTexture = texture;
|
||||||
container->textureCapacity = 1;
|
container->textureCapacity = 1;
|
||||||
|
|||||||
@@ -6775,7 +6775,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();
|
||||||
SDL_CopyProperties(createinfo->props, container->header.info.props);
|
if (createinfo->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