robinmanuelthiel / flexbutton

Flexible button control for Xamarin.Forms
MIT License
240 stars 34 forks source link

Update GestureFrameRenderer.cs #70

Closed Jamesmallon1 closed 5 years ago

Jamesmallon1 commented 5 years ago

This is an update to prevent your code crashing on navigation between pages on UWP! I tested this by extracting your source and importing it into my project and making the change.

Jamesmallon1 commented 5 years ago

Describe the bug If you navigate from a page on UWP that contains a flexbutton to another page with a flexbutton, a crash occurs. This crash intermittently occurs sometimes it may not. This may be due to a lot of other content being present on either page.

StackTrace

Message = "System.NullReferenceException: Object reference not set to an instance of an object.\r\n
   at Flex.UWP.CustomRenderers.GestureFrameRenderer.Control_PointerReleased(Object sender, PointerRoutedEventArgs e)"

To Reproduce Steps to reproduce the behavior:

Produce a UWP page with lots of content on it, webviews, layouts, and 7 flex buttons produce another page with a flex button and lots of content as above. navigate back and forth between pages.

Please complete the following information:

Which version of the FlexButton do you use?(0.9.0) Which version of Xamarin.Forms do you use?(3.4.0) Which OS are you talking about?(UWP 16299)

Jamesmallon1 commented 5 years ago

This is also linked to issue #69

robinmanuelthiel commented 5 years ago

Awesome, thank you very much for your contribution! Especially, as I am not working much on UWP and Windows currently, this is highly appreciated!!