diff --git a/CHANGELOG.md b/CHANGELOG.md index cb281d4..39cb699 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ Other new features: 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 c69679b..1e67a15 100644 --- a/src/textwin.cpp +++ b/src/textwin.cpp @@ -1024,7 +1024,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); hoveredRow = r;