Commit 60e14d32 authored by Trevor Spiteri's avatar Trevor Spiteri

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
parent 5ed5cde1
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment