summaryrefslogtreecommitdiff
path: root/servers/audio_server.cpp
diff options
context:
space:
mode:
authorQuentin Guidée <quentin.guidee@gmail.com>2022-12-17 19:57:16 -0500
committerQuentin Guidée <quentin.guidee@gmail.com>2022-12-17 19:57:16 -0500
commit7465ca9587c513532a19a61017ff1a73e9607221 (patch)
treef154a1f5564df8a26b394acfb48ef486e8f7942e /servers/audio_server.cpp
parentd44d0cc0fd543da143010ad96978951facd87c1e (diff)
Remove redundant nullptr check before delete
Diffstat (limited to 'servers/audio_server.cpp')
-rw-r--r--servers/audio_server.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index e657570f9b..c7d626c159 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;
});