summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorbentmar <bjorn.bentmar@gmail.com>2017-04-28 11:27:15 +0200
committerStephane Delcroix <stephane@delcroix.org>2017-05-03 10:06:35 +0200
commite509ed905a93bfa76dd781d7119559f6e94b8278 (patch)
treec886015a0e1338871f4cbe1e82eda4aff7113899 /Xamarin.Forms.Platform.Android
parent719b4cc3d2963f836cdcea00e7730321a89ffe0a (diff)
downloadxamarin-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.cs6
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
+}