summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-10-23 20:10:40 +0200
committerTamás Bunth <btomi96@gmail.com>2017-10-23 22:37:59 +0200
commit090e9ecd0960e6027cfaaf4600e95dc311524143 (patch)
treebcb02fcd018617ca8418d48998a50f186c35ae93
parent189abcf0db61c41a565bd355294bf6e712fc3e5a (diff)
tdf#113284 Check vector length before use
Change-Id: I52b5e6712ba34de0a73bc45ce2262b211b5ac50e Reviewed-on: https://gerrit.libreoffice.org/43725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index c748bdb42041..2aa7f657d82d 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -300,6 +300,9 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& source, SwAttrPool& po
ToxWhitespaceStripper stripper(source.GetText().sText);
result.text = stripper.GetStrippedString();
+ if( source.aTOXSources.empty() )
+ return result;
+
const SwTextNode* pSrc = source.aTOXSources.at(0).pNd->GetTextNode();
if (!pSrc->HasHints()) {
return result;