Explorar o código

Updated TryGetGuid for migration

JPVenson hai 8 meses
pai
achega
07ed9a3ea4
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      Emby.Server.Implementations/Data/SqliteExtensions.cs

+ 10 - 2
Emby.Server.Implementations/Data/SqliteExtensions.cs

@@ -127,8 +127,16 @@ namespace Emby.Server.Implementations.Data
                 return false;
             }
 
-            result = reader.GetGuid(index);
-            return true;
+            try
+            {
+                result = reader.GetGuid(index);
+                return true;
+            }
+            catch
+            {
+                result = Guid.Empty;
+                return false;
+            }
         }
 
         public static bool TryGetString(this SqliteDataReader reader, int index, out string result)