Commit f29ffcbb authored by Trevor Spiteri's avatar Trevor Spiteri Committed by Nathan Lee

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

Backport from 1.0alpha master
Cherry picked from 60e14d32
parent decb8fcb
......@@ -502,7 +502,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