summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FontEditor/GlyphEditorWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Applications/FontEditor/GlyphEditorWidget.cpp b/Applications/FontEditor/GlyphEditorWidget.cpp
index d1fcb13dd1..dc06a6a5e6 100644
--- a/Applications/FontEditor/GlyphEditorWidget.cpp
+++ b/Applications/FontEditor/GlyphEditorWidget.cpp
@@ -99,9 +99,9 @@ void GlyphEditorWidget::draw_at_mouse(const GUI::MouseEvent& event)
int x = (event.x() - 1) / m_scale;
int y = (event.y() - 1) / m_scale;
auto bitmap = font().glyph_bitmap(m_glyph);
- if (x >= bitmap.width())
+ if (x < 0 || x >= bitmap.width())
return;
- if (y >= bitmap.height())
+ if (y < 0 || y >= bitmap.height())
return;
if (bitmap.bit_at(x, y) == set)
return;