Forward port crash fix from proko2
Forward port crash fix from proko2

svn path=/trunk/kdepim/; revision=376316

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