Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alextp committed Sep 20, 2020
1 parent e72f99b commit 5e4b48d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32menustyler.pas
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ procedure TWin32MenuStyler.HandleMenuDrawItem(Sender: TObject; ACanvas: TCanvas;
R.Bottom:= ARect.Bottom;
Windows.DrawTextW(ACanvas.Handle, PWideChar(BufW), Length(BufW), R, NDrawFlags);

if (not bInBar) and Assigned(mi.Bitmap) then
if (not bInBar) and Assigned(mi.Bitmap) and (mi.Bitmap.Width>0) then
begin
ACanvas.Draw(
ARect.Left + (dx-mi.Bitmap.Width) div 2,
Expand Down

0 comments on commit 5e4b48d

Please sign in to comment.