Backport of SVN commit 778530 by tmcguire:
Backport of SVN commit 778530 by tmcguire:

Don't crash after changing the layout and replying then.

CCBUG: 158171

svn path=/branches/kdepim/enterprise/kdepim/; revision=778728

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