Fix a theoretical access violation for servers with 0 databases. Could potentially fix bug #1844815 .

This commit is contained in:
Ansgar Becker
2007-12-16 23:44:57 +00:00
parent bac6b5bff2
commit e32bd641eb

View File

@ -209,7 +209,8 @@ begin
end;
end;
if comboSelectDatabase.ItemIndex = -1 then
// Select first database if at least one is available.
if (comboSelectDatabase.ItemIndex = -1) and (comboSelectDatabase.Items.Count>0) then
comboSelectDatabase.ItemIndex := 0;
comboSelectDatabaseChange(self);