* BIG rewrite of header handling and slimming of context_loop and session_loop; shuff...
[citadel.git] / webcit / vcard_edit.c
index 7e9355abf647c5e4f9b47bdb0983ee82a1da7840..31780a6a136a2507be84e71501d558bb38df2482 100644 (file)
@@ -1054,7 +1054,8 @@ void do_edit_vcard(long msgnum, char *partnum,
        wprintf("</td></tr></table>\n");
        do_template("endbox", NULL);
        wDumpContent(1);
-       DestroyMessageSummary(Msg);
+       if (Msg != NULL)
+               DestroyMessageSummary(Msg);
 }
 
 
@@ -1217,7 +1218,7 @@ void display_vcard_photo_img(void)
        const char *contentType;
        wcsession *WCC = WC;
 
-       msgnum = StrTol(WCC->UrlFragment2);
+       msgnum = StrBufExtract_long(WCC->Hdr->ReqLine, 2, '/');
        
        vcard = load_mimepart(msgnum,"1");
        v = VCardLoad(vcard);