@@ -1349,9 +1349,7 @@ static void D3D12_INTERNAL_ReleaseBufferContainer(
13491349 }
13501350
13511351 // Containers are just client handles, so we can free immediately
1352- if (container -> debugName ) {
1353- SDL_free (container -> debugName );
1354- }
1352+ SDL_free (container -> debugName );
13551353 SDL_free (container -> buffers );
13561354 SDL_free (container );
13571355
@@ -1426,9 +1424,7 @@ static void D3D12_INTERNAL_ReleaseTextureContainer(
14261424 SDL_DestroyProperties (container -> header .info .props );
14271425
14281426 // Containers are just client handles, so we can destroy immediately
1429- if (container -> debugName ) {
1430- SDL_free (container -> debugName );
1431- }
1427+ SDL_free (container -> debugName );
14321428 SDL_free (container -> textures );
14331429 SDL_free (container );
14341430
@@ -2072,9 +2068,7 @@ static void D3D12_SetBufferName(
20722068 D3D12BufferContainer * container = (D3D12BufferContainer * )buffer ;
20732069
20742070 if (renderer -> debug_mode && text != NULL ) {
2075- if (container -> debugName != NULL ) {
2076- SDL_free (container -> debugName );
2077- }
2071+ SDL_free (container -> debugName );
20782072
20792073 container -> debugName = SDL_strdup (text );
20802074
@@ -2096,9 +2090,7 @@ static void D3D12_SetTextureName(
20962090 D3D12TextureContainer * container = (D3D12TextureContainer * )texture ;
20972091
20982092 if (renderer -> debug_mode && text != NULL ) {
2099- if (container -> debugName != NULL ) {
2100- SDL_free (container -> debugName );
2101- }
2093+ SDL_free (container -> debugName );
21022094
21032095 container -> debugName = SDL_strdup (text );
21042096
0 commit comments