summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsian-ht <sian.ht@gmail.com>2017-02-24 09:17:48 +0000
committerJazzyNico <nicoduf@yahoo.fr>2017-02-24 09:17:48 +0000
commit7a73a9ce1d5f8cc1a6d970ea8f093773f4ddd9db (patch)
treea5a0497276f224437942e868c265822855faa6f6
parent[Bug #980527] Gcodetools: Unlocalized messages. (diff)
downloadinkscape-7a73a9ce1d5f8cc1a6d970ea8f093773f4ddd9db.tar.gz
inkscape-7a73a9ce1d5f8cc1a6d970ea8f093773f4ddd9db.zip
[Bug #1464987] --export-latex crashes with a svg file.
Fixed bugs: - https://launchpad.net/bugs/1464987 (bzr r15544)
-rw-r--r--src/libnrtype/Layout-TNG.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnrtype/Layout-TNG.h b/src/libnrtype/Layout-TNG.h
index e06b8392f..c39315106 100644
--- a/src/libnrtype/Layout-TNG.h
+++ b/src/libnrtype/Layout-TNG.h
@@ -194,7 +194,7 @@ public:
/** For expressing paragraph alignment. These values are rotated in the
case of vertical text, but are not dependent on whether the paragraph is
rtl or ltr, thus LEFT is always either left or top. */
- enum Alignment {LEFT, CENTER, RIGHT, FULL};
+ enum Alignment {LEFT, CENTER, RIGHT, FULL, NONE};
/** The CSS spec allows line-height:normal to be whatever the user agent
thinks will look good. This is our value, as a multiple of font-size. */
@@ -1144,7 +1144,7 @@ inline unsigned Layout::paragraphIndex(iterator const &it) const
{return it._char_index == _characters.size() ? _paragraphs.size() - 1 : _characters[it._char_index].line(this).in_paragraph;}
inline Layout::Alignment Layout::paragraphAlignment(iterator const &it) const
- {return _paragraphs[paragraphIndex(it)].alignment;}
+ {return (_paragraphs.size() == 0) ? NONE : _paragraphs[paragraphIndex(it)].alignment;}
inline bool Layout::iterator::nextGlyph()
{