Fix bug #3855: segfault at startup with old profile and IMAP account