summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextodfwriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextodfwriter.cpp')
-rw-r--r--src/gui/text/qtextodfwriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 3561c185a6..0e8666565f 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -358,7 +358,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
int precedingSpaces = 0;
int exportedIndex = 0;
for (int i=0; i <= fragmentText.count(); ++i) {
- QChar character = fragmentText[i];
+ QChar character = (i == fragmentText.count() ? QChar() : fragmentText.at(i));
bool isSpace = character.unicode() == ' ';
// find more than one space. -> <text:s text:c="2" />