From b267a34e4c072588fbcafe1dcd83230d687bdb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=9C=AC=E7=86=8Akumamon?= Date: Mon, 16 Dec 2019 14:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20GraphicalOverlayComponent?= =?UTF-8?q?=E5=9C=A8=E6=89=80=E5=B1=9E=E6=8E=A7=E4=BB=B6=20this.OnPaint(nu?= =?UTF-8?q?ll)=20=E6=97=B6=E4=BC=9A=E6=8A=9B=E5=87=BA=E4=BE=8B=E5=A4=96?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controls/GraphicalOverlay/GraphicalOverlayComponent.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HZH_Controls/HZH_Controls/Controls/GraphicalOverlay/GraphicalOverlayComponent.cs b/HZH_Controls/HZH_Controls/Controls/GraphicalOverlay/GraphicalOverlayComponent.cs index f2cba16..67c6ce3 100644 --- a/HZH_Controls/HZH_Controls/Controls/GraphicalOverlay/GraphicalOverlayComponent.cs +++ b/HZH_Controls/HZH_Controls/Controls/GraphicalOverlay/GraphicalOverlayComponent.cs @@ -79,6 +79,8 @@ namespace HZH_Controls.Controls private void Control_Paint(object sender, PaintEventArgs e) { + if (e == null) return; + // As each control on the form is repainted, this handler is called. Control control = sender as Control; -- Gitee