diff --git a/src/UI/DocumentViews/MpvContainer.cc b/src/UI/DocumentViews/MpvContainer.cc index 27cef58a9c51d2ad033934fe6d02aa911a67c4f3..67471cf973a783c27505626e67d4326c28aa8678 100644 --- a/src/UI/DocumentViews/MpvContainer.cc +++ b/src/UI/DocumentViews/MpvContainer.cc @@ -69,7 +69,7 @@ MpvContainer::closeMpv() noexcept registerMpvDurationCallback(nullptr); mpv_handle *tmp_mpv = mpv; mpv = nullptr; // Stop all other callbacks here - mpv_destroy(tmp_mpv); + mpv_terminate_destroy(tmp_mpv); } } @@ -239,6 +239,10 @@ MpvContainer::onMpvEvent() noexcept break; handleMpvEvent(event); } + + if (mpv == nullptr) { + qDebug() << "MPV was closed while in the event loop!"; + } } void