summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorJoris Vergeer <jorisvergeer1992@gmail.com>2017-03-03 13:25:49 +0100
committerRui Marinho <me@ruimarinho.net>2017-03-03 12:25:49 +0000
commit38c0b34e91e2148e78704432afec6b086c9fc0c9 (patch)
tree30418ec176995697575fb1e3c87f3c644944646a /Xamarin.Forms.Platform.iOS
parent5d4fdd5e748e1d3f5a7e17d5e2680c5d520cc620 (diff)
downloadxamarin-forms-38c0b34e91e2148e78704432afec6b086c9fc0c9.tar.gz
xamarin-forms-38c0b34e91e2148e78704432afec6b086c9fc0c9.tar.bz2
xamarin-forms-38c0b34e91e2148e78704432afec6b086c9fc0c9.zip
Fix for nullreferenceexception when a TabbedPage is rendered without a set CurrentPage (#669)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
index 2b8e70c4..a1b2802a 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
@@ -235,7 +235,11 @@ namespace Xamarin.Forms.Platform.iOS
public override UIViewController ChildViewControllerForStatusBarHidden()
{
- return GetViewController(Tabbed.CurrentPage);
+ var current = Tabbed.CurrentPage;
+ if (current == null)
+ return null;
+
+ return GetViewController(current);
}
void UpdateCurrentPagePreferredStatusBarUpdateAnimation()