summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-10-23 20:10:40 +0200
committerAron Budea <aron.budea@collabora.com>2017-11-17 14:46:47 +0100
commit2a63ffd4d51d0e643d569a8d43b81bb691e45916 (patch)
treef501fcfe28a8f75ee09f311968ce894dc9731470
parent701e1ec3a2e38a7b0bd2cdd3511a2a50578ea74e (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> (cherry picked from commit 090e9ecd0960e6027cfaaf4600e95dc311524143) Reviewed-on: https://gerrit.libreoffice.org/44849 Reviewed-by: Aron Budea <aron.budea@collabora.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;