mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Add a safety check to avoid AVs in rare situations, where the number of db objects has been decreased from outside. Fixes issue #2114.
This commit is contained in:
@ -6681,7 +6681,8 @@ begin
|
||||
Objects := Connection.GetDBObjects(ActiveDatabase);
|
||||
ObjNode := DBtree.GetFirstChild(FindDBNode(ActiveDatabase));
|
||||
while Assigned(ObjNode) do begin
|
||||
if (Objects[ObjNode.Index].Name = FocusObject.Name)
|
||||
if (Cardinal(Objects.Count) > ObjNode.Index)
|
||||
and (Objects[ObjNode.Index].Name = FocusObject.Name)
|
||||
and (Objects[ObjNode.Index].NodeType = FocusObject.NodeType) then begin
|
||||
SelectNode(DBtree, ObjNode);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user