From 87e8e3b80ff7052be76d93656ad3f872ae4ddb67 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 9 Apr 2021 20:14:29 +0000 Subject: [PATCH] fpspreadsheet: Fix search engine crashing when search string is empty. Patch by forum user russeld (https://forum.lazarus.freepascal.org/index.php/topic,54026.0.html). git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7987 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpssearch.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/fpspreadsheet/source/common/fpssearch.pas b/components/fpspreadsheet/source/common/fpssearch.pas index 6c748d27e..85ff92ce5 100644 --- a/components/fpspreadsheet/source/common/fpssearch.pas +++ b/components/fpspreadsheet/source/common/fpssearch.pas @@ -464,6 +464,9 @@ begin txt := AWorksheet.ReadAsText(cell); end; + if txt = '' then + exit(false); + if soRegularExpr in FSearchParams.Options then Result := FRegEx.Exec(txt) else