From 6bcdf300ee3c651f32b0c78df0b2d3cf6f0263e1 Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 14 Jun 2016 18:45:13 +0000 Subject: Added some defensive coding for mouse events in the edit control. --- neschr/EditControl.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/neschr/EditControl.cs b/neschr/EditControl.cs index 566ac46..067d320 100644 --- a/neschr/EditControl.cs +++ b/neschr/EditControl.cs @@ -403,6 +403,11 @@ namespace UCTest protected override void OnMouseMove(MouseEventArgs e) { + if (!initialised) + { + return; + } + int gx; int gy; @@ -536,6 +541,11 @@ namespace UCTest protected override void OnMouseDown(MouseEventArgs e) { + if (!initialised) + { + return; + } + int gx; int gy; @@ -576,6 +586,11 @@ namespace UCTest protected override void OnMouseUp(MouseEventArgs e) { + if (!initialised) + { + return; + } + int gx; int gy; -- cgit v1.2.3