summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorbentmar <bjorn.bentmar@gmail.com>2017-04-28 11:14:42 +0200
committerStephane Delcroix <stephane@delcroix.org>2017-05-03 10:06:19 +0200
commite60363b9df7e96ceeec6b440e7144215dad6c194 (patch)
tree1b82a8f68df234d9667b863dd94082ba739da74f /Xamarin.Forms.Platform.Android
parent74ea23788f12c2a7d3647e05bf141852367db94b (diff)
downloadxamarin-forms-e60363b9df7e96ceeec6b440e7144215dad6c194.tar.gz
xamarin-forms-e60363b9df7e96ceeec6b440e7144215dad6c194.tar.bz2
xamarin-forms-e60363b9df7e96ceeec6b440e7144215dad6c194.zip
add disposed check on FastRenderers.FrameRenderer (#887)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/FastRenderers/FrameRenderer.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/FastRenderers/FrameRenderer.cs b/Xamarin.Forms.Platform.Android/FastRenderers/FrameRenderer.cs
index 51444650..d3583cce 100644
--- a/Xamarin.Forms.Platform.Android/FastRenderers/FrameRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/FastRenderers/FrameRenderer.cs
@@ -197,12 +197,18 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers
void UpdateBackgroundColor()
{
+ if (_disposed)
+ return;
+
Color bgColor = Element.BackgroundColor;
SetCardBackgroundColor(bgColor.IsDefault ? AColor.White : bgColor.ToAndroid());
}
void UpdateShadow()
{
+ if (_disposed)
+ return;
+
float elevation = _defaultElevation;
if (elevation == -1f)
@@ -216,6 +222,9 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers
void UpdateCornerRadius()
{
+ if (_disposed)
+ return;
+
if (_defaultCornerRadius == -1f)
{
_defaultCornerRadius = Radius;
@@ -231,4 +240,4 @@ namespace Xamarin.Forms.Platform.Android.FastRenderers
Radius = cornerRadius;
}
}
-} \ No newline at end of file
+}