From b70f3fdbe62a73b903ec587376666d073b13b24f Mon Sep 17 00:00:00 2001 From: Maxim Ganetsky Date: Thu, 7 Mar 2024 16:38:07 +0300 Subject: [PATCH] LCL-Gtk2: make FillRect (winapi emulation) work even when current DC's brush is null, issue #40823, patch by Artem Izmaylov --- lcl/interfaces/gtk2/gtk2devicecontext.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk2/gtk2devicecontext.inc b/lcl/interfaces/gtk2/gtk2devicecontext.inc index 2f3f4c8c45..b26a1eb638 100644 --- a/lcl/interfaces/gtk2/gtk2devicecontext.inc +++ b/lcl/interfaces/gtk2/gtk2devicecontext.inc @@ -773,7 +773,7 @@ var ClipArea: TGdkRectangle; begin BrushChanged := False; - if not IsNullBrush then + if (ABrush <> 0) and not PGdiObject(ABrush)^.IsNullBrush then begin if FHasTransf then begin