From 7465ca9587c513532a19a61017ff1a73e9607221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Sat, 17 Dec 2022 19:57:16 -0500 Subject: [PATCH] Remove redundant nullptr check before delete --- servers/audio_server.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index e657570f9b4..c7d626c1591 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -449,12 +449,8 @@ void AudioServer::_mix_step() { case AudioStreamPlaybackListNode::AWAITING_DELETION: case AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION: playback_list.erase(playback, [](AudioStreamPlaybackListNode *p) { - if (p->prev_bus_details) { - delete p->prev_bus_details; - } - if (p->bus_details) { - delete p->bus_details; - } + delete p->prev_bus_details; + delete p->bus_details; p->stream_playback.unref(); delete p; });