mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-21 06:45:44 +00:00
Don't do NULL-checks before SDL_free()
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
This commit is contained in:
committed by
Sam Lantinga
parent
2f810e0a5f
commit
aaee09d6ed
@@ -938,12 +938,8 @@ void DestroyVulkanVideoContext(VulkanVideoContext *context)
|
||||
if (context->device) {
|
||||
context->vkDeviceWaitIdle(context->device);
|
||||
}
|
||||
if (context->instanceExtensions) {
|
||||
SDL_free(context->instanceExtensions);
|
||||
}
|
||||
if (context->deviceExtensions) {
|
||||
SDL_free(context->deviceExtensions);
|
||||
}
|
||||
SDL_free(context->instanceExtensions);
|
||||
SDL_free(context->deviceExtensions);
|
||||
if (context->waitSemaphores) {
|
||||
for (uint32_t i = 0; i < context->waitSemaphoreCount; ++i) {
|
||||
context->vkDestroySemaphore(context->device, context->waitSemaphores[i], NULL);
|
||||
|
||||
Reference in New Issue
Block a user