From 093e21799f3f69eeeec5ff04ac721440c8b72c9b Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Sat, 20 May 2023 10:48:52 -0700 Subject: [PATCH] fix: crash if save is called on non-unstable build --- AltStore/Unstable Features/UnstableFeatures.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AltStore/Unstable Features/UnstableFeatures.swift b/AltStore/Unstable Features/UnstableFeatures.swift index 238986ee..69d82290 100644 --- a/AltStore/Unstable Features/UnstableFeatures.swift +++ b/AltStore/Unstable Features/UnstableFeatures.swift @@ -72,6 +72,9 @@ class UnstableFeatures { UserDefaults.shared.unstableFeatures = try! JSONEncoder().encode(rawFeatures) print("\(load ? "Loaded" : "Saved") unstable features: \(String(describing: rawFeatures))") + #else + // we want this to crash, this function should never be triggered on non-unstable builds + fatalError("Tried to save unstable features on non-unstable build!") #endif }