Prevent occasional crash

I came across the crash by accident when checking how it works to have
multiple windows showing the same document. Pasting in lots of text
and then quickly telling LO to exit with Cmd-Q caused a crash here as
GetPostItMgr() returned NULL.

Change-Id: Ib9e636df0832a679a1d81fa3856ea0a7105a69c3
(cherry picked from commit 0eb1ef39084a978e8c2bec977ebabf6708f0c073)
(cherry picked from commit f35f0e1cafffb636653f24cab489d208d2851787)
Reviewed-on: https://gerrit.libreoffice.org/13243
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>