Fix AV on opening one of the CREATE or ALTER TABLE dialogs for the second time, after an automatic reconnect. Related: r2312, r2328 and issue #858

This commit is contained in:
Ansgar Becker
2009-04-15 19:32:20 +00:00
parent 92d6a938db
commit 91716960bb

View File

@ -6899,8 +6899,11 @@ begin
Combobox.Items.Clear;
// Cache datasets
if (dsShowEngines = nil) and (dsHaveEngines = nil) then
if ((dsShowEngines = nil) or (dsShowEngines.State = dsInactive)) and
((dsHaveEngines = nil) or (dsShowEngines.State = dsInactive)) then
begin
FreeAndNil(dsShowEngines);
FreeAndNil(dsHaveEngines);
dsShowEngines := GetResults('SHOW ENGINES', True);
if dsShowEngines = nil then
dsHaveEngines := GetResults('SHOW VARIABLES LIKE ''have%''');