Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index da5974c..7b75ffa 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -651,8 +651,10 @@ void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which) if (!which) return; - clistcell*cur; - mailimap_single_body_fld_param*param; - for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { - param = (mailimap_single_body_fld_param*)cur->data; - if (param) { - target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); + if (which->bd_parameter && which->bd_parameter->pa_list && which->bd_parameter->pa_list->count>0) { + clistcell*cur; + mailimap_single_body_fld_param*param=0; + for (cur = clist_begin(which->bd_parameter->pa_list);cur!=NULL;cur=clist_next(cur)) { + param = (mailimap_single_body_fld_param*)cur->data; + if (param) { + target_part.addParameter(QString(param->pa_name).lower(),QString(param->pa_value)); + } } |