summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorJimmy Garrido <jimmygarrido@outlook.com>2016-08-25 18:05:18 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-08-25 18:05:18 (GMT)
commit5b85aafcd671f5e8745cf52339c20378f91cb748 (patch)
treefde3e4df44d210d1298d7415cbacb6c5357f1131 /Xamarin.Forms.Platform.Android
parent417f7493d2d08964c52f0bbd59bcce3292ce8d04 (diff)
downloadxamarin-forms-5b85aafcd671f5e8745cf52339c20378f91cb748.zip
xamarin-forms-5b85aafcd671f5e8745cf52339c20378f91cb748.tar.gz
xamarin-forms-5b85aafcd671f5e8745cf52339c20378f91cb748.tar.bz2
Fix crash when ItemsSource is set to null (#320)
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
index 3c952a9..ca0f733 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/TabbedPageRenderer.cs
@@ -190,7 +190,8 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName == nameof(TabbedPage.CurrentPage))
- ScrollToCurrentPage();
+ if(Element.CurrentPage != null)
+ ScrollToCurrentPage();
else if (e.PropertyName == NavigationPage.BarBackgroundColorProperty.PropertyName)
UpdateBarBackgroundColor();
else if (e.PropertyName == NavigationPage.BarTextColorProperty.PropertyName)