Skip to content

Commit

Permalink
pop3-migration: Fixed crash when not specifying pop3_migration_mailbo…
Browse files Browse the repository at this point in the history
…x setting.
  • Loading branch information
sirainen committed Sep 15, 2016
1 parent d97f081 commit 6d2e2c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/pop3-migration/pop3-migration-plugin.c
Expand Up @@ -838,9 +838,14 @@ pop3_migration_mailbox_search_init(struct mailbox_transaction_context *t,

static void pop3_migration_mailbox_allocated(struct mailbox *box)
{
struct pop3_migration_mail_storage *mstorage =
POP3_MIGRATION_CONTEXT(box->storage);
struct mailbox_vfuncs *v = box->vlast;
struct pop3_migration_mailbox *mbox;

if (mstorage == NULL)
return;

mbox = p_new(box->pool, struct pop3_migration_mailbox, 1);
mbox->module_ctx.super = *v;
box->vlast = &mbox->module_ctx.super;
Expand Down

0 comments on commit 6d2e2c7

Please sign in to comment.