From 930c0678ed202ffac9041fa9f2f9149d2ff793ac Mon Sep 17 00:00:00 2001 From: Koen Hendriks Date: Thu, 4 May 2017 16:08:30 +0200 Subject: [PATCH] [Android] Add null check before creating and drawing canvas bugzilla 55559 & 45602 (#899) * [Android] Add null check before creating and drawing canvas bugzilla 55559 & bugzilla 45602. * [Android] REFACTOR Add null check before creating and drawing canvas bugzilla 55559 & 45602 #899 --- Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs index 921c654..9c84b62 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs @@ -188,6 +188,9 @@ namespace Xamarin.Forms.Platform.Android e.PropertyName == Frame.OutlineColorProperty.PropertyName || e.PropertyName == Frame.CornerRadiusProperty.PropertyName) { + if(_normalBitmap == null) + return; + using (var canvas = new ACanvas(_normalBitmap)) { int width = Bounds.Width(); -- 2.7.4