From 89e9b18cf3bda2b3c770afb9b75d223f0be0b4d9 Mon Sep 17 00:00:00 2001 From: tux3 Date: Sat, 6 Jun 2015 21:57:09 +0200 Subject: [PATCH] Better checks before cleanupCall --- src/core/coreav.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/coreav.cpp b/src/core/coreav.cpp index 5b14ed5f4..6c43eef2e 100644 --- a/src/core/coreav.cpp +++ b/src/core/coreav.cpp @@ -431,7 +431,8 @@ void Core::onAvEnd(void* _toxav, int32_t call_index, void* core) emit static_cast(core)->avEnd(friendId, call_index); - cleanupCall(call_index); + if (calls[call_index].active) + cleanupCall(call_index); } void Core::onAvRinging(void* _toxav, int32_t call_index, void* core) @@ -471,7 +472,8 @@ void Core::onAvRequestTimeout(void* _toxav, int32_t call_index, void* core) emit static_cast(core)->avRequestTimeout(friendId, call_index); - cleanupCall(call_index); + if (calls[call_index].active) + cleanupCall(call_index); } void Core::onAvPeerTimeout(void* _toxav, int32_t call_index, void* core)