azchohfi / LottieUWP

UWP port of Lottie(https://github.com/airbnb/lottie-android)
Apache License 2.0
273 stars 45 forks source link

Xamarin Forms UWP Null Reference Exception On Navigation #28

Closed MattRames closed 6 years ago

MattRames commented 6 years ago

When you navigate from a page playing an animation and go back to that page a null reference exception is thrown.

Com.Airbnb.Xamarin.Forms.Lottie: 2.5.1 LottieUWP: 2.5.1

System.NullReferenceException: Object reference not set to an instance of an object. at LottieUWP.LottieDrawable.CanvasControlOnDraw(ICanvasAnimatedControl canvasControl, CanvasAnimatedDrawEventArgs args)

51ec6be2-9c86-405a-80fa-d920c53630df

Reproduction project: https://drive.google.com/file/d/184cMHR9icG2NfUvPIwnsKrRDaE6M-D8P/view?usp=sharing

azchohfi commented 6 years ago

Fixed by c84843ae0b3b67ed1d9e546b0b2141e932bd66cd.