Skip to content

Commit

Permalink
Fix crash when opening document with search active (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonBogun authored Sep 9, 2023
1 parent 2dedfa4 commit 89a6912
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,7 @@ struct Document {
const wxChar *SearchNext(wxDC &dc, bool focusmatch, bool jump) {
if (!sys->searchstring.Len()) return _(L"No search string.");
bool lastsel = true;
if (!rootgrid) return nullptr; //fix crash when opening new doc
Cell *next =
rootgrid->FindNextSearchMatch(sys->searchstring, nullptr, selected.GetCell(), lastsel);
sys->frame->SetSearchTextBoxBackgroundColour(next);
Expand Down

0 comments on commit 89a6912

Please sign in to comment.