From 9580930d2c494fa5149399fb5078d8e92e8b8083 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Mon, 17 Aug 2015 03:16:35 +0200 Subject: added a check that is present in surrounding code, but not on this particular line, which is most infortunate, since it led to a crash. Fixed bugs: - https://launchpad.net/bugs/1445204 (bzr r14308) --- src/libnrtype/Layout-TNG-OutIter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp index 707897f50..137fe0a0f 100644 --- a/src/libnrtype/Layout-TNG-OutIter.cpp +++ b/src/libnrtype/Layout-TNG-OutIter.cpp @@ -507,7 +507,7 @@ void Layout::queryCursorShape(iterator const &it, Geom::Point &position, double position[Geom::Y] = span->line(this).baseline_y + span->baseline_shift; } // up to now *position is the baseline point, not the final point which will be the bottom of the descent - double vertical_scale = _glyphs.back().vertical_scale; + double vertical_scale = _glyphs.empty() ? 1.0 : _glyphs.back().vertical_scale; if (_directions_are_orthogonal(_blockProgression(), TOP_TO_BOTTOM)) { height = vertical_scale * span->line_height.ascent + span->line_height.descent; -- cgit v1.2.3