]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed hooks with plugins that didn't override any vfuncs
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 16:21:29 +0000 (17:21 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 16:21:29 +0000 (17:21 +0100)
src/lib-storage/mail-storage-hooks.c

index abba9e447c9fab431a7451c85508b16a51d4bbd7..b8b85de8fb7db9ac70ca39d37b425879f035e43d 100644 (file)
@@ -203,6 +203,11 @@ static void hook_build_update(struct hook_build_context *ctx, void *_vlast)
        void (**vlast)() = _vlast;
        struct hook_stack *stack;
 
+       if (ctx->tail->vfuncs == vlast) {
+               /* no vfuncs overridden */
+               return;
+       }
+
        /* ctx->vfuncs_stack->vfuncs points to the root vfuncs,
           ctx->vfuncs_stack->next->vfuncs points to the first super function
           that is being called, and so on.