Explorar el Código

SettingsManager: Instead of crashing we just return an empty array

Carola Nitz hace 6 años
padre
commit
3b95b01af0
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Sources/VLCSettingsSpecifierManager.swift

+ 2 - 1
Sources/VLCSettingsSpecifierManager.swift

@@ -20,7 +20,8 @@ class VLCSettingsSpecifierManager: NSObject {
     
     var items: NSArray {
         guard let items = specifier?.multipleValues() as NSArray? else {
-            fatalError("VLCSettingsSpecifierManager: No rows provided for \(specifier?.key() ?? "null specifier")")
+            assertionFailure("VLCSettingsSpecifierManager: No rows provided for \(specifier?.key() ?? "null specifier")")
+            return []
         }
         return items
     }