diff options
| author | Trevor Spiteri <trevor.spiteri@um.edu.mt> | 2019-01-15 17:59:12 +0000 |
|---|---|---|
| committer | Trevor Spiteri <trevor.spiteri@um.edu.mt> | 2019-01-15 17:59:12 +0000 |
| commit | 60e14d32a5be0f286271921cb4a3014a6db1595e (patch) | |
| tree | a390b1970176a27d9585b146d4d08cea46245e6f /src/libnrtype | |
| parent | out-of-bounds access on Enter-up-down in new text field (diff) | |
| download | inkscape-60e14d32a5be0f286271921cb4a3014a6db1595e.tar.gz inkscape-60e14d32a5be0f286271921cb4a3014a6db1595e.zip | |
out-of-bounds access on Enter-up-left in new text field
Reproduce using:
1. Select text tool (F8)
2. Click on empty canvas
3. Hit Enter
4. Hit Up
5. Hit Left
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/Layout-TNG-OutIter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp index 761d58245..1c20ac30b 100644 --- a/src/libnrtype/Layout-TNG-OutIter.cpp +++ b/src/libnrtype/Layout-TNG-OutIter.cpp @@ -503,7 +503,7 @@ void Layout::queryCursorShape(iterator const &it, Geom::Point &position, double if (it._glyph_index == -1) { rotation = 0.0; } else if(it._glyph_index == 0) { - rotation = _glyphs[0].rotation; + rotation = _glyphs.empty() ? 0.0 : _glyphs[0].rotation; } else{ rotation = _glyphs[it._glyph_index - 1].rotation; } |
