Browse Source

Fix crash of "Next Search Result" cmd on the empty search result

Fix #15247
pull/15293/head
Don Ho 5 months ago
parent
commit
fa2fce2b41
  1. 3
      PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp

3
PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp

@ -905,6 +905,9 @@ void Finder::gotoNextFoundResult(int direction)
{ {
case pos_infront: // 2 situation: 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 if (markingLine._segmentPostions[0].second < SC_SEARCHRESULT_LINEBUFFERMAXLENGTH) // 1. The occurrence is displayed in the line
{ {
occurrenceNumberInLine_base1 = 1; occurrenceNumberInLine_base1 = 1;

Loading…
Cancel
Save