mrxten / XamEffects

📱 Xamarin.Forms UI effects
MIT License
248 stars 41 forks source link

Check if container is null in IsDisposed #13

Closed Stensan closed 6 years ago

Stensan commented 6 years ago

Hi, if the container is gone before the animation ended, the app can crash.

I suggest this fix in TouchEffectPlatform.cs (both plattform projects): public bool IsDisposed => (Container as IVisualElementRenderer)?.Element == null; instead of public bool IsDisposed => ((IVisualElementRenderer)Container).Element == null;

mrxten commented 6 years ago

Hmm, yes you right.

Thanks.

mrxten commented 6 years ago

Fixed in 1.5.1-pre