Resolves: fdo#70358 crash when deleting tables

Change-Id: I87282e363425a1bb6d9ab92e07717f66ee56a6c5
(cherry picked from commit e8e12b32ae23ee9b1613ef7794b83adbde27e9f8)
Reviewed-on: https://gerrit.libreoffice.org/6509
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>