mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Silence two crashes in QuotedDatabase and IsSameAs. See https://www.heidisql.com/forum.php?t=39040
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 := '';
|
||||
|
||||
Reference in New Issue
Block a user