summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-25 12:17:17 +0200
committerPetr Mladek <pmladek@suse.cz>2013-05-07 13:21:01 +0200
commit720166c2b38910f339e713bf07d244c81eca8e69 (patch)
tree8716a7b632f511be9a4cc2caee7be375bd58df59 /sw
parentb1065a611e7a961bd3acc5b9e340c3ceb2b92115 (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')
-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();