LCL: controlcanvas: protect TControlCanvas.CreateHandle debugln with an IFDEF

git-svn-id: trunk@53274 -
This commit is contained in:
ondrej 2016-11-01 19:18:42 +00:00
parent 6a74f2e274
commit b8c9f6d510

View File

@ -79,9 +79,11 @@ begin
inherited CreateHandle
else
begin
{$IFDEF VerboseCanvas}
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']);
{$ENDIF}
if (FDeviceContext = 0) then
begin
// access to window handle can cause another TControlCanvas.CreateHandle