summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-25 12:17:17 +0200
committerMichael Meeks <michael.meeks@suse.com>2013-04-25 12:54:26 +0000
commit7bd7e75d6914573289656ea544f8928097614b14 (patch)
tree2a3654bb7d6136858330d00f7e22da067d5cee12 /sw/source/core
parentf98d8baa449d922e4cc5bcee97c9ee1733b0f65d (diff)
Belts and braces for crash in null pointer dereference
Change-Id: I17fa205f16929b913084c8eee320a73416b1eda0 (cherry picked from commit d34a159010fc24e13613058d25a9d6b56f7855bd) Reviewed-on: https://gerrit.libreoffice.org/3605 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/unocore/unotext.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 004e7af2c87e..77b44f4262f0 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1626,7 +1626,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SwTableNode * pStartTableNode(pStartStartNode->FindTableNode());
// Is it the same table start node than the end?
SwTableNode *const pEndStartTableNode(pEndStartNode->FindTableNode());
- while (pEndStartTableNode->GetIndex() < pStartTableNode->GetIndex())
+ while (pEndStartTableNode && pStartTableNode &&
+ pEndStartTableNode->GetIndex() < pStartTableNode->GetIndex())
{
SwStartNode* pStartStartTableNode = pStartTableNode->StartOfSectionNode();
pStartTableNode = pStartStartTableNode->FindTableNode();