Procházet zdrojové kódy

SettingsManager: Instead of crashing we just return an empty array

Carola Nitz před 6 roky
rodič
revize
3b95b01af0
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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
     }