File iax-no-audio-abort.diff of Package kiax

Index: iaxclient/lib/iaxclient_lib.c
===================================================================
--- iaxclient.orig/lib/iaxclient_lib.c
+++ iaxclient/lib/iaxclient_lib.c
@@ -595,8 +595,13 @@ EXPORT int iaxc_stop_processing_thread()
 
 
 static int service_audio()
 {
+	if (!audio.nDevices) {
+		printf("ERROR: No audio device open!\n");
+		fflush(stdout);
+		abort();
+	}
 	// we do this here to avoid looking at calls[-1]
 	if(selected_call < 0) {
 	    static int i=0;
 	    if(i++ % 50 == 0) iaxc_do_levels_callback(-99,-99);
openSUSE Build Service is sponsored by