tag editor: check if mouse cursor is in range

This commit is contained in:
Andrzej Rybczak
2009-09-06 06:17:38 +02:00
parent c631add910
commit 1459b27c0d

View File

@@ -725,7 +725,7 @@ void TagEditor::MouseButtonPressed(MEVENT me)
{ {
if (w != FParser) if (w != FParser)
PrevColumn(); PrevColumn();
if (me.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED)) if (size_t(me.y) < FParser->Size() && (me.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED)))
{ {
FParser->Goto(me.y); FParser->Goto(me.y);
if (me.bstate & BUTTON3_PRESSED) if (me.bstate & BUTTON3_PRESSED)