Skip to content

Commit

Permalink
additional check to avoid exception (#2313)
Browse files Browse the repository at this point in the history
  • Loading branch information
FoggyFinder authored Jun 12, 2023
1 parent b60b09d commit a426c16
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SKTouchHandler(Action<SKTouchEventArgs> onTouchAction, Func<double, doubl

public void SetEnabled(View view, bool enableTouchEvents)
{
if (view != null)
if (view != null && view.Handle != IntPtr.Zero)
{
view.Touch -= OnTouch;
if (enableTouchEvents)
Expand Down

0 comments on commit a426c16

Please sign in to comment.