Commit a6f62d8f authored by Pekka Pessi's avatar Pekka Pessi

sdp_print(): correctly handle NULL session

Ignore-this: 206a9027d6dfb73371d7f0ddac5f640b

Coverity issue.

darcs-hash:20090513170301-db55f-50e27e21669f8248567afa05d327212b6d6161cb.gz
parent 46b416d7
......@@ -154,7 +154,10 @@ sdp_printer_t *sdp_print(su_home_t *home,
p->pr_mode_manual = (flags & sdp_f_mode_manual) != 0;
p->pr_mode_always = (flags & sdp_f_mode_always) != 0;
print_session(p, session);
if (sdp)
print_session(p, session);
else
printing_error(p, "NULL session description");
return p;
}
......@@ -267,8 +270,6 @@ static void print_session(sdp_printer_t *p, sdp_session_t const *sdp)
{
p->pr_ok = 1;
if (!sdp)
printing_error(p, "NULL session description");
if (p->pr_ok && sdp->sdp_version)
print_version(p, sdp->sdp_version);
if (p->pr_ok && sdp->sdp_origin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment