diff --git a/mbuni/mmlib/mms_uaprof.c b/mbuni/mmlib/mms_uaprof.c index a9d1fd8..f31c949 100644 --- a/mbuni/mmlib/mms_uaprof.c +++ b/mbuni/mmlib/mms_uaprof.c @@ -727,9 +727,9 @@ static int modify_msg(MIMEEntity *msg, MmsUaProfile *prof) sup = modify_msg(x, prof); if (!sup && /* not supported and is the presentation part, set flag */ - cid && octstr_compare(cid, startp) == 0) + cid && startp && octstr_compare(cid, startp) == 0) sflag = 1; - if (cid) octstr_destroy(cid); + octstr_destroy(cid); mime_entity_replace_part(msg, i, x); /* Put back changed one */ http_destroy_headers(hx);