Fix crash due to double delete of Janus_Manager

pull/3544/head
Isaac Connor 2022-07-28 15:26:32 -04:00
parent b2bcd9bc25
commit 5cb5132bf7
1 changed files with 4 additions and 3 deletions

View File

@ -3177,13 +3177,13 @@ int Monitor::Close() {
} }
if (analysis_thread) { if (analysis_thread) {
analysis_thread->Stop(); analysis_thread->Stop();
Debug(1, "Analysi stopped"); Debug(1, "Analysis stopped");
} }
//ONVIF Teardown //ONVIF Teardown
if (Poller) { if (Poller) {
Poller->Stop(); Poller->Stop();
Debug(1, "Polleri stopped"); Debug(1, "Poller stopped");
} }
#ifdef WITH_GSOAP #ifdef WITH_GSOAP
if (onvif_event_listener && (soap != nullptr)) { if (onvif_event_listener && (soap != nullptr)) {
@ -3198,8 +3198,9 @@ int Monitor::Close() {
} //End ONVIF } //End ONVIF
#endif #endif
//Janus Teardown //Janus Teardown
if (janus_enabled && (purpose == CAPTURE)) { if (janus_enabled and (purpose == CAPTURE) and Janus_Manager) {
delete Janus_Manager; delete Janus_Manager;
Janus_Manager = nullptr;
} }
if (audio_fifo) { if (audio_fifo) {