handle empty list sync
authorVolker Birk <vb@pep.foundation>
Sun, 21 Oct 2018 12:35:25 +0200
branchsync
changeset 3085d838e2d02278
parent 3084 2addd22aad87
child 3086 c35fd5131941
child 3105 d087d038ca66
handle empty list
src/message_api.c
     1.1 --- a/src/message_api.c	Sun Oct 21 12:33:59 2018 +0200
     1.2 +++ b/src/message_api.c	Sun Oct 21 12:35:25 2018 +0200
     1.3 @@ -2762,7 +2762,7 @@
     1.4      }
     1.5  
     1.6      bloblist_t *_s;
     1.7 -    for (_s = src->attachments; _s; _s = _s->next) {
     1.8 +    for (_s = src->attachments; _s && _s->value; _s = _s->next) {
     1.9          if (_s->value == NULL && _s->size == 0){
    1.10              _m = bloblist_add(_m, NULL, 0, _s->mime_type, _s->filename);
    1.11              if (_m == NULL)