mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Fix unusable database tree after entering a regular expression with syntax errors into the filter combo.
This commit is contained in:
@ -6879,8 +6879,15 @@ begin
|
||||
for i:=0 to DatabasesWanted.Count-1 do begin
|
||||
rx.Expression := '^'+DatabasesWanted[i]+'$';
|
||||
for j:=0 to AllDatabases.Count-1 do begin
|
||||
if (Databases.IndexOf(AllDatabases[j]) = -1) and rx.Exec(AllDatabases[j]) then
|
||||
Databases.Add(AllDatabases[j]);
|
||||
if (Databases.IndexOf(AllDatabases[j]) = -1) then try
|
||||
// The regular expression can have syntax errors which lead to an AV
|
||||
if rx.Exec(AllDatabases[j]) then
|
||||
Databases.Add(AllDatabases[j]);
|
||||
comboOnlyDBs.Color := clWindow;
|
||||
except
|
||||
comboOnlyDBs.Color := clFuchsia;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
rx.Free;
|
||||
|
Reference in New Issue
Block a user