BSoundPlayer: check for NULL node

Fixes #16683

Change-Id: I81c252b6eeaeb35cc5f33a796a7242c0965c3f27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3546
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Máximo Castañeda
2020-12-23 19:57:32 +00:00
committed by Jérôme Duval
parent 569564c02d
commit 80a920f65d
+1 -1
View File
@@ -150,7 +150,7 @@ cleanup:
// this should be the case. The Quit() synchronization
// is handled by the DeleteHook inheritance.
// NOTE: this might be crucial when using a BMediaEventLooper.
if (fPlayerNode->Release() != NULL) {
if (fPlayerNode != NULL && fPlayerNode->Release() != NULL) {
TRACE("BSoundPlayer::~BSoundPlayer: Error the producer node "
"appears to be acquired by someone else than us!");
}