diff --git a/src/Player/PlayerProxy.cpp b/src/Player/PlayerProxy.cpp index 03e4b8cf..ee81e952 100644 --- a/src/Player/PlayerProxy.cpp +++ b/src/Player/PlayerProxy.cpp @@ -169,10 +169,10 @@ bool PlayerProxy::close(MediaSource &sender,bool force) { strongSelf->_muxer.reset(); strongSelf->setMediaSource(nullptr); strongSelf->teardown(); - if (strongSelf->_on_close) { - strongSelf->_on_close(); - } }); + if (_on_close) { + _on_close(); + } WarnL << sender.getSchema() << "/" << sender.getVhost() << "/" << sender.getApp() << "/" << sender.getId() << " " << force; return true; }