Backport r860837 by tmcguire from trunk to the 4.1 branch:
Backport r860837 by tmcguire from trunk to the 4.1 branch:

Fix crash when connecting to an IMAP account.

svn path=/branches/KDE/4.1/kdepim/; revision=860950

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi