Skip to content

Commit a426c16

Browse files
authoredJun 12, 2023
additional check to avoid exception (#2313)
1 parent b60b09d commit a426c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎source/SkiaSharp.Views.Forms/SkiaSharp.Views.Forms.Android/SKTouchHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public SKTouchHandler(Action<SKTouchEventArgs> onTouchAction, Func<double, doubl
2222

2323
public void SetEnabled(View view, bool enableTouchEvents)
2424
{
25-
if (view != null)
25+
if (view != null && view.Handle != IntPtr.Zero)
2626
{
2727
view.Touch -= OnTouch;
2828
if (enableTouchEvents)

0 commit comments

Comments
 (0)
Please sign in to comment.