diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 0d9757a9..54d43077 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -9895,13 +9895,19 @@ begin if (not Assigned(CompareTo)) or (CompareTo = nil) then begin Result := False; end else begin - Result := FConnection.IdentifierEquals(Name, CompareTo.Name) - and (NodeType = CompareTo.NodeType) - and (Database = CompareTo.Database) - and (Schema = CompareTo.Schema) - and (Column = CompareTo.Column) - and (ArgTypes = CompareTo.ArgTypes) - and (Connection = CompareTo.Connection); + try + Result := FConnection.IdentifierEquals(Name, CompareTo.Name) + and (NodeType = CompareTo.NodeType) + and (Database = CompareTo.Database) + and (Schema = CompareTo.Schema) + and (Column = CompareTo.Column) + and (ArgTypes = CompareTo.ArgTypes) + and (Connection = CompareTo.Connection); + except + // No reproduction recipe yet, but numerous crashes from above were reported + on E:EAccessViolation do + Result := False; + end; end; end; diff --git a/source/main.pas b/source/main.pas index b213e06b..3e81316a 100644 --- a/source/main.pas +++ b/source/main.pas @@ -10697,11 +10697,17 @@ begin and (DataGridTable <> nil) and Assigned(DataGridTable) then begin - KeyName := DataGridTable.QuotedDatabase+'.'+DataGridTable.QuotedName; - FocusedCol := ''; - if DataGrid.FocusedColumn > NoColumn then - FocusedCol := DataGrid.Header.Columns[DataGrid.FocusedColumn].Text; - DataGridFocusedCell.Values[KeyName] := IntToStr(DataGrid.FocusedNode.Index) + DELIM + FocusedCol; + try + KeyName := DataGridTable.QuotedDatabase+'.'+DataGridTable.QuotedName; + FocusedCol := ''; + if DataGrid.FocusedColumn > NoColumn then + FocusedCol := DataGrid.Header.Columns[DataGrid.FocusedColumn].Text; + DataGridFocusedCell.Values[KeyName] := IntToStr(DataGrid.FocusedNode.Index) + DELIM + FocusedCol; + except + on E:EAccessViolation do begin + LogSQL('HandleDataGridAttributes: '+E.Message, lcError); + end; + end; end; DataGridFocusedNodeIndex := 0; DataGridFocusedColumnName := '';