diff --git a/src/plugins/imap-old-stats/imap-stats-plugin.c b/src/plugins/imap-old-stats/imap-stats-plugin.c index 43a9068ae4..6da71a5129 100644 --- a/src/plugins/imap-old-stats/imap-stats-plugin.c +++ b/src/plugins/imap-old-stats/imap-stats-plugin.c @@ -62,7 +62,7 @@ static void stats_command_post(struct client_command_context *cmd) string_t *str; buffer_t *buf; - if (scmd == NULL) + if (suser == NULL || scmd == NULL) return; new_stats = stats_alloc(pool_datastack_create());