[Kde-pim] KMime::Content destructor problem

Alexis Papadopoulos iacp at free.fr
Sun Jul 1 22:44:06 BST 2007


Hello,

I just started playing aroung with libkmime today, more particularly the 
KMime::Content class. I'm calling the constructor with some email headers, 
without any body.

Thus, the c_ontent member remains without value. The problem is that when my 
instance is destroyed with the following code :

Content::~Content()
{
  delete c_ontents;
  delete h_eaders;
}

I get a segfault because of the first line. Am I doing something wrong, or 
should some if (!c_ontents)   if (!h_eaders) be added in here ? (adding them 
does solve my problem, but I get the feeling that I'm doing something wrong)

Btw, there is no content because I'm retrieving only the headers of an email 
from an IMAP server.

Thanks in advance for your comments,
Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070701/f9fcf1fa/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/


More information about the kde-pim mailing list