From 97ffc204b84677139cdf584959856aa98ff20aa9 Mon Sep 17 00:00:00 2001 From: dayanch96 <38832025+dayanch96@users.noreply.github.com> Date: Sat, 4 Feb 2023 22:10:42 +0300 Subject: [PATCH] prevent app crash for jailbroken devices same for jailed devices if ytabconfig not injected --- Settings.xm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Settings.xm b/Settings.xm index 328f281..b1ef891 100644 --- a/Settings.xm +++ b/Settings.xm @@ -32,6 +32,12 @@ extern NSBundle *uYouPlusBundle(); } %end +%hook YTSettingsSectionController +- (void)setSelectedItem:(NSUInteger)selectedItem { + if (selectedItem != NSNotFound) %orig; +} +%end + %hook YTSettingsSectionItemManager %new(v@:@) - (void)updateTweakSectionWithEntry:(id)entry {