diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 8f91f1b3..fc03af43 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -9942,6 +9942,7 @@ end; constructor TDBObject.Create(OwnerConnection: TDBConnection); begin NodeType := lntNone; + GroupType := lntNone; Name := ''; Database := ''; Schema := ''; diff --git a/source/main.pas b/source/main.pas index 0fb6bf6e..b618339b 100644 --- a/source/main.pas +++ b/source/main.pas @@ -9562,7 +9562,7 @@ begin DBObj.WasSelected := True; FActiveDbObj := TDBObject.Create(DBObj.Connection); FActiveDbObj.Assign(DBObj^); - if Assigned(Node.Parent) then + if Assigned(Node.Parent) and (DBtree.GetNodeLevel(Node) > 0) then ParentDBObj := Sender.GetNodeData(Node.Parent); case FActiveDbObj.NodeType of