diff --git a/daemon/codec.c b/daemon/codec.c index f09a7c53b..2f05b0326 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -500,7 +500,7 @@ static int __unused_pt_number(struct call_media *media, int num) { } static void __single_codec(struct call_media *media, const struct sdp_ng_flags *flags) { - if (flags->opmode != OP_ANSWER || !flags->single_codec) + if (!flags || flags->opmode != OP_ANSWER || !flags->single_codec) return; int have_codec = 0; for (GList *l = media->codecs_prefs_recv.head; l;) {