]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Previous change broke other plugins.
authorTimo Sirainen <tss@iki.fi>
Tue, 7 Apr 2009 18:42:16 +0000 (14:42 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 7 Apr 2009 18:42:16 +0000 (14:42 -0400)
--HG--
branch : HEAD

src/plugins/quota/quota-storage.c

index 443f8b2825124c76e87c8175dbf6b41cf12ea2f8..8c219164336a62fb447932f8f6528273b5e134cf 100644 (file)
@@ -511,22 +511,21 @@ void quota_mail_storage_created(struct mail_storage *storage)
        union mail_storage_module_context *qstorage;
        struct quota *quota;
 
-       if (qlist == NULL)
-               return;
-
-       qlist->storage = storage;
-
-       qstorage = p_new(storage->pool,
-                        union mail_storage_module_context, 1);
-       qstorage->super = storage->v;
-       storage->v.destroy = quota_storage_destroy;
-       storage->v.mailbox_open = quota_mailbox_open;
-
-       MODULE_CONTEXT_SET_SELF(storage, quota_storage_module, qstorage);
-
-       /* register to owner's quota roots */
-       quota = quota_get_mail_user_quota(storage->ns->owner);
-       quota_add_user_storage(quota, storage);
+       if (qlist != NULL) {
+               qlist->storage = storage;
+               qstorage = p_new(storage->pool,
+                                union mail_storage_module_context, 1);
+               qstorage->super = storage->v;
+               storage->v.destroy = quota_storage_destroy;
+               storage->v.mailbox_open = quota_mailbox_open;
+
+               MODULE_CONTEXT_SET_SELF(storage, quota_storage_module,
+                                       qstorage);
+
+               /* register to owner's quota roots */
+               quota = quota_get_mail_user_quota(storage->ns->owner);
+               quota_add_user_storage(quota, storage);
+       }
 
        if (quota_next_hook_mail_storage_created != NULL)
                quota_next_hook_mail_storage_created(storage);