fix: possible crash when grid context menu opens

This commit is contained in:
Ansgar Becker
2026-01-12 15:04:25 +01:00
parent e7571e3b86
commit 3905955dfa

View File

@@ -3655,7 +3655,7 @@ begin
// Enable or disable ImageView action
Grid := ActiveGrid;
(Sender as TAction).Enabled := (Grid <> nil)
and (Grid.FocusedColumn <> NoColumn)
and (Grid.FocusedColumn-1 <> NoColumn)
and (GridResult(Grid).DataType(Grid.FocusedColumn-1).Category = dtcBinary)
end;
@@ -10683,6 +10683,8 @@ begin
// Header click disabled
if not AppSettings.ReadBool(asColumnHeaderClick) then
Exit;
if HitInfo.Column = NoColumn then
Exit;
ColName := Sender.Columns[HitInfo.Column].Text;
// Add a new order column after a columns title has been clicked
// Check if order column is already existant