Remove redundant nullptr check before delete

This commit is contained in:
Quentin Guidée 2022-12-17 19:57:16 -05:00
parent d44d0cc0fd
commit 7465ca9587
No known key found for this signature in database
GPG Key ID: BA2A6E3FD8A2B599
1 changed files with 2 additions and 6 deletions

View File

@ -449,12 +449,8 @@ void AudioServer::_mix_step() {
case AudioStreamPlaybackListNode::AWAITING_DELETION: case AudioStreamPlaybackListNode::AWAITING_DELETION:
case AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION: case AudioStreamPlaybackListNode::FADE_OUT_TO_DELETION:
playback_list.erase(playback, [](AudioStreamPlaybackListNode *p) { playback_list.erase(playback, [](AudioStreamPlaybackListNode *p) {
if (p->prev_bus_details) { delete p->prev_bus_details;
delete p->prev_bus_details; delete p->bus_details;
}
if (p->bus_details) {
delete p->bus_details;
}
p->stream_playback.unref(); p->stream_playback.unref();
delete p; delete p;
}); });