diff options
Diffstat (limited to 'toxav/msi.c')
-rw-r--r-- | toxav/msi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toxav/msi.c b/toxav/msi.c index d68e4a9c..65b6c4e4 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -205,6 +205,12 @@ int msi_hangup ( MSICall* call ) | |||
205 | MSISession* session = call->session; | 205 | MSISession* session = call->session; |
206 | pthread_mutex_lock(session->mutex); | 206 | pthread_mutex_lock(session->mutex); |
207 | 207 | ||
208 | if ( call->state == msi_CallInactive ) { | ||
209 | LOGGER_ERROR("Call is in invalid state!"); | ||
210 | pthread_mutex_unlock(session->mutex); | ||
211 | return -1; | ||
212 | } | ||
213 | |||
208 | MSIMessage msg; | 214 | MSIMessage msg; |
209 | msg_init(&msg, requ_pop); | 215 | msg_init(&msg, requ_pop); |
210 | 216 | ||