From fa2fce2b41a36340c8f7a86b2c061a8895059161 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 15 Jun 2024 05:00:32 +0200 Subject: [PATCH] Fix crash of "Next Search Result" cmd on the empty search result Fix #15247 --- PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 383a9f333..cbf506784 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -905,6 +905,9 @@ void Finder::gotoNextFoundResult(int direction) { case pos_infront: // 2 situation: { + if (!markingLine._segmentPostions.size()) + return; + if (markingLine._segmentPostions[0].second < SC_SEARCHRESULT_LINEBUFFERMAXLENGTH) // 1. The occurrence is displayed in the line { occurrenceNumberInLine_base1 = 1;