summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vergeer <jorisvergeer1992@gmail.com>2017-03-03 13:25:49 +0100
committerRui Marinho <me@ruimarinho.net>2017-03-09 10:02:22 +0000
commitf94dbe6be6ea18aab7b4caff79595cd877c9071c (patch)
tree2b3f7f04ce7dfd6543c482fbd0f1aefe8aad7fce
parentbba58c241787cd80370b275c754465acec634a77 (diff)
downloadxamarin-forms-f94dbe6be6ea18aab7b4caff79595cd877c9071c.tar.gz
xamarin-forms-f94dbe6be6ea18aab7b4caff79595cd877c9071c.tar.bz2
xamarin-forms-f94dbe6be6ea18aab7b4caff79595cd877c9071c.zip
Fix for nullreferenceexception when a TabbedPage is rendered without a set CurrentPage (#669)
-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 27492768..1ce48406 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs
@@ -233,7 +233,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()