Fix error reporting in toxav_call()

This commit is contained in:
Eniz Vukovic 2015-11-29 00:38:33 +01:00
parent 73b2144edc
commit 96a7b7b4fc

View File

@ -286,12 +286,10 @@ bool toxav_call(ToxAV *av, uint32_t friend_number, uint32_t audio_bit_rate, uint
goto END; goto END;
} }
ToxAVCall *call = call_new(av, friend_number, error); ToxAVCall *call = call_new(av, friend_number, &rc);
if (call == NULL) { if (call == NULL)
rc = TOXAV_ERR_CALL_MALLOC;
goto END; goto END;
}
call->audio_bit_rate = audio_bit_rate; call->audio_bit_rate = audio_bit_rate;
call->video_bit_rate = video_bit_rate; call->video_bit_rate = video_bit_rate;