diff --git a/lcl/include/controlcanvas.inc b/lcl/include/controlcanvas.inc index 7ad3862e9e..11b22587a1 100644 --- a/lcl/include/controlcanvas.inc +++ b/lcl/include/controlcanvas.inc @@ -79,7 +79,7 @@ begin inherited CreateHandle else begin - if ControlIsPainting and + if not ControlIsPainting and (WidgetSet.GetLCLCapability(lcCanDrawOutsideOnPaint) = LCL_CAPABILITY_NO) then debugln(['TControlCanvas.CreateHandle WARNING: accessing the canvas of '+DbgSName(FControl)+' is not supported outside of paint message']); if (FDeviceContext = 0) then