forward port SVN commit 571253 by winterz:
forward port SVN commit 571253 by winterz:

Fix a crash (I hope) that happens sometimes upon exiting KMail.

svn path=/trunk/KDE/kdepim/; revision=580586

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