- fix: Crash when drag the selection beyond the end of the document.

This commit is contained in:
Roy Qu 2023-03-23 17:04:23 +08:00
parent 6eded18fd6
commit 0fdac532b2
1 changed files with 1 additions and 1 deletions

View File

@ -6352,7 +6352,7 @@ void QSynEdit::dropEvent(QDropEvent *event)
mDropped = true;
return;
}
if (coord.line<=0 || coord.line>=mDocument->lengthOfLongestLine()) {
if (coord.line<=0 || coord.line>=mDocument->count()) {
//do nothing if drag out of range
event->acceptProposedAction();
mDropped = true;