mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-02-03 12:08:22 +00:00
Remove unnecessary null pointer checks
This commit is contained in:
parent
e652369f22
commit
9e87511da0
src
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue