[iOS] Fix NRE when looking for internal buttons (#6170)
authorRui Marinho <me@ruimarinho.net>
Sat, 11 May 2019 01:33:50 +0000 (18:33 -0700)
committerGitHub <noreply@github.com>
Sat, 11 May 2019 01:33:50 +0000 (18:33 -0700)
Xamarin.Forms.Platform.iOS/Extensions/UIViewExtensions.cs

index a641972..ba97c00 100644 (file)
@@ -126,7 +126,7 @@ namespace Xamarin.Forms.Platform.MacOS
                                if (result != null)
                                        return result;
 
-                               for (var i = 0; i < descendantView.Subviews.Length; i++)
+                               for (var i = 0; i < descendantView.Subviews?.Length; i++)
                                        queue.Enqueue(descendantView.Subviews[i]);
                        }