diff options
author | Quentin Guidée <quentin.guidee@gmail.com> | 2022-12-17 19:57:16 -0500 |
---|---|---|
committer | Quentin Guidée <quentin.guidee@gmail.com> | 2022-12-17 19:57:16 -0500 |
commit | 7465ca9587c513532a19a61017ff1a73e9607221 (patch) | |
tree | f154a1f5564df8a26b394acfb48ef486e8f7942e | |
parent | d44d0cc0fd543da143010ad96978951facd87c1e (diff) |
Remove redundant nullptr check before delete
-rw-r--r-- | servers/audio_server.cpp | 8 |
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; }); |