diff --git a/CHANGELOG.md b/CHANGELOG.md index 7794e2c..ea99f14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Changelog Bug fixes: * Do not crash when applying a symmetry constraint to two points. * Fix TTF font metrics again (properly this time). + * Various minor crashes. 2.2 --- diff --git a/src/textwin.cpp b/src/textwin.cpp index b698f48..656ac62 100644 --- a/src/textwin.cpp +++ b/src/textwin.cpp @@ -988,7 +988,7 @@ void TextWindow::MouseEvent(bool leftClick, bool leftDown, double x, double y) { break; } } - if(r >= rows || c >= MAX_COLS) { + if(r < 0 || c < 0 || r >= rows || c >= MAX_COLS) { SetMousePointerToHand(false); goto done; }