diff --git a/src/core/libraries/libc_internal/libc_internal.cpp b/src/core/libraries/libc_internal/libc_internal.cpp index 8453a78b9..f22fb6a69 100644 --- a/src/core/libraries/libc_internal/libc_internal.cpp +++ b/src/core/libraries/libc_internal/libc_internal.cpp @@ -208,9 +208,7 @@ void* PS4_SYSV_ABI internal_operator_new(size_t size) { } void PS4_SYSV_ABI internal_operator_delete(void* ptr) { - if (ptr) { - std::free(ptr); - } + std::free(ptr); } int PS4_SYSV_ABI internal_posix_memalign(void** ptr, size_t alignment, size_t size) { diff --git a/src/core/thread.cpp b/src/core/thread.cpp index e154530d5..feb120d93 100644 --- a/src/core/thread.cpp +++ b/src/core/thread.cpp @@ -120,10 +120,8 @@ void NativeThread::Exit() { }; sigaltstack(&sig_stack, nullptr); - if (sig_stack_ptr) { - free(sig_stack_ptr); - sig_stack_ptr = nullptr; - } + free(sig_stack_ptr); + sig_stack_ptr = nullptr; pthread_exit(nullptr); #endif diff --git a/src/imgui/renderer/imgui_impl_sdl3.cpp b/src/imgui/renderer/imgui_impl_sdl3.cpp index ccd31d03a..5d49b6d2a 100644 --- a/src/imgui/renderer/imgui_impl_sdl3.cpp +++ b/src/imgui/renderer/imgui_impl_sdl3.cpp @@ -586,9 +586,7 @@ void Shutdown() { IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?"); ImGuiIO& io = ImGui::GetIO(); - if (bd->clipboard_text_data) { - SDL_free((void*)bd->clipboard_text_data); - } + SDL_free((void*)bd->clipboard_text_data); for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) SDL_DestroyCursor(bd->mouse_cursors[cursor_n]); CloseGamepads();