--- ./pan-0.13.3.ref/pan/base/decode.c Tue Dec 10 19:50:25 2002 +++ ./pan-0.13.3/pan/base/decode.c Mon Jan 6 01:15:23 2003 @@ -350,16 +350,23 @@ if (is_nonempty_string (group_name)) group = server_get_named_group (dd->server, group_name); - if (group!=NULL && group_ref_articles_if_loaded (group)) { - int qty = 0; - Article ** articles = g_alloca (sizeof(Article*) * dd->mid_qty); - for (i=0; imid_qty; ++i) { - Article * a = group_get_article_by_message_id (group, dd->mids[i]->message_id); - if (a != NULL) - articles[qty++] = a; + if (group!=NULL) + { + if (!group_ref_articles_if_loaded (group)) + { + group_ref_articles (group, NULL); + } + { + int qty = 0; + Article ** articles = g_alloca (sizeof(Article*) * dd->mid_qty); + for (i=0; imid_qty; ++i) { + Article * a = group_get_article_by_message_id (group, dd->mids[i]->message_id); + if (a != NULL) + articles[qty++] = a; + } + articles_add_flag (articles, qty, (success?STATE_DECODED:STATE_DECODE_FAILED)); + group_unref_articles (group, NULL); } - articles_add_flag (articles, qty, (success?STATE_DECODED:STATE_DECODE_FAILED)); - group_unref_articles (group, NULL); } }