From 9464b369a465617e7e1509e451177ea71ff25c59 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Sat, 6 Dec 2014 13:26:27 -0500 Subject: [PATCH] fix possible crash --- src/audio_call.c | 4 +++- src/groupchat.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio_call.c b/src/audio_call.c index 69d5806..a229242 100644 --- a/src/audio_call.c +++ b/src/audio_call.c @@ -334,7 +334,9 @@ void callback_peer_timeout ( void* av, int32_t call_index, void* arg ) void write_device_callback_group(Tox *m, int groupnum, int peernum, const int16_t *pcm, unsigned int samples, uint8_t channels, unsigned int sample_rate, void *arg) { - ToxWindow *windows = arg; + return; /* TODO: fix this stuff */ + + ToxWindow *windows = arg; int i; for (i = 0; i < MAX_WINDOWS_NUM; ++i) { diff --git a/src/groupchat.c b/src/groupchat.c index befc04e..d5456dd 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -813,10 +813,8 @@ static int group_audio_write(int peernum, int groupnum, const int16_t *pcm, unsi } static void groupchat_onWriteDevice(ToxWindow *self, Tox *m, int groupnum, int peernum, const int16_t *pcm, - unsigned int samples, uint8_t channels, unsigned int sample_rate) + unsigned int samples, uint8_t channels, unsigned int sample_rate) { - return; /* TODO: fix this stuff */ - if (groupnum != self->num) return;