Browse Source

Fixed app crash when CoreRepository shells are not initialised properly.

Frank van den Bos 9 months ago
parent
commit
22d53704c1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      InABox.Mobile/InABox.Mobile.Shared/DataModels/Shell.cs

+ 3 - 3
InABox.Mobile/InABox.Mobile.Shared/DataModels/Shell.cs

@@ -119,9 +119,9 @@ namespace InABox.Mobile
 
             if (_row != null)
             {
-                var col = _columns.IndexOf(property);
-                var value = Row.Get<T>(col); //() Row.Values[];
-                return value;
+                var col = _columns?.IndexOf(property);
+                if (col != null)
+                    return Row.Get<T>(col.Value); //() Row.Values[];
             }
 
             return CoreUtils.GetDefault<T>();