mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Prevent accessing non existing string list item in TMainForm.ListDatabasesGetText, to fix a sporadic crash after dropping a database. Closes #33
This commit is contained in:
@@ -9436,7 +9436,12 @@ begin
|
||||
Idx := Sender.GetNodeData(Node);
|
||||
|
||||
Conn := ActiveConnection;
|
||||
DBname := Conn.AllDatabases[Idx^];
|
||||
if Idx^ < Conn.AllDatabases.Count then begin
|
||||
DBname := Conn.AllDatabases[Idx^];
|
||||
end else begin
|
||||
// Probably a database were dropped shortly before.
|
||||
DBname := '';
|
||||
end;
|
||||
if Conn.DbObjectsCached(DBname) then
|
||||
Objects := Conn.GetDBObjects(DBname)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user