* Check if Element parent is null before getting the padding insets
* - move if up earlier
void UpdateUseSafeArea()
{
- if (!Forms.IsiOS11OrNewer) return;
+ if (!Forms.IsiOS11OrNewer)
+ return;
if (!UsingSafeArea)
{
void UpdateShellInsetPadding()
{
- var setInsets = Shell.GetSetPaddingInsets(Element) || Shell.GetSetPaddingInsets(Element?.Parent);
+ if (Element == null)
+ return;
+
+ var setInsets = Shell.GetSetPaddingInsets(Element);
+
+ if (!setInsets && Element.Parent != null)
+ setInsets = Shell.GetSetPaddingInsets(Element.Parent);
+
if (setInsets)
{
nfloat topPadding = 0;