diff options
author | bentmar <bjorn.bentmar@gmail.com> | 2017-04-28 11:27:15 +0200 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2017-05-03 10:06:35 +0200 |
commit | e509ed905a93bfa76dd781d7119559f6e94b8278 (patch) | |
tree | c886015a0e1338871f4cbe1e82eda4aff7113899 /Xamarin.Forms.Platform.Android | |
parent | 719b4cc3d2963f836cdcea00e7730321a89ffe0a (diff) | |
download | xamarin-forms-e509ed905a93bfa76dd781d7119559f6e94b8278.tar.gz xamarin-forms-e509ed905a93bfa76dd781d7119559f6e94b8278.tar.bz2 xamarin-forms-e509ed905a93bfa76dd781d7119559f6e94b8278.zip |
Add disposed check on FastRenderer.VisualElemen... (#888)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/FastRenderers/VisualElementRenderer.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/FastRenderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Android/FastRenderers/VisualElementRenderer.cs index d94cfd01..34ea7e34 100644 --- a/Xamarin.Forms.Platform.Android/FastRenderers/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.Android/FastRenderers/VisualElementRenderer.cs @@ -36,8 +36,8 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers } public void UpdateBackgroundColor(Color? color = null) - { - if (Element == null || Control == null) + { + if (_disposed || Element == null || Control == null) return; Control.SetBackgroundColor((color ?? Element.BackgroundColor).ToAndroid()); @@ -95,4 +95,4 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers UpdateBackgroundColor(); } } -}
\ No newline at end of file +} |