summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libnrtype/Layout-TNG-Output.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnrtype/Layout-TNG-Output.cpp b/src/libnrtype/Layout-TNG-Output.cpp
index a3c11133b..812abba58 100644
--- a/src/libnrtype/Layout-TNG-Output.cpp
+++ b/src/libnrtype/Layout-TNG-Output.cpp
@@ -667,7 +667,8 @@ void Layout::fitToPathAlign(SVGLength const &startOffset, Path const &path)
offset = startOffset.computed;
}
- switch (_paragraphs.front().alignment) {
+ Alignment alignment = _paragraphs.empty() ? LEFT : _paragraphs.front().alignment;
+ switch (alignment) {
case CENTER:
offset -= _getChunkWidth(0) * 0.5;
break;