Skip to content

Commit 6309305

Browse files
committed
fix: crash on right-click in empty area of query result grid
Related to a forum post: https://www.heidisql.com/forum.php?t=44747
1 parent 10fc117 commit 6309305

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/main.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@ procedure TMainForm.actDataPreviewUpdate(Sender: TObject);
35443544
// Enable or disable ImageView action
35453545
Grid := ActiveGrid;
35463546
(Sender as TAction).Enabled := (Grid <> nil)
3547-
and (Grid.FocusedColumn-1 <> NoColumn)
3547+
and (Grid.FocusedColumn > 0) // may be NoColumn/-1 or InvalidColumn/-2
35483548
and (GridResult(Grid).DataType(Grid.FocusedColumn-1).Category = dtcBinary)
35493549
end;
35503550

0 commit comments

Comments
 (0)