From 8c61561d6375cfad3571cea98013b549ed6ecd6b Mon Sep 17 00:00:00 2001 From: Vu Hoan Huy <43563783+d4rkk3y@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:22:07 +0700 Subject: [PATCH] fix(Tiktok - Settings): check for null when opening ads settings (#443) --- .../java/app/revanced/tiktok/settingsmenu/SettingsMenu.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/tiktok/settingsmenu/SettingsMenu.java b/app/src/main/java/app/revanced/tiktok/settingsmenu/SettingsMenu.java index f79d16b7..fc43153b 100644 --- a/app/src/main/java/app/revanced/tiktok/settingsmenu/SettingsMenu.java +++ b/app/src/main/java/app/revanced/tiktok/settingsmenu/SettingsMenu.java @@ -2,6 +2,7 @@ package app.revanced.tiktok.settingsmenu; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.preference.PreferenceFragment; import android.view.View; import android.widget.FrameLayout; @@ -35,7 +36,8 @@ public class SettingsMenu { * @return Whether the settings menu should be initialized. */ public static boolean initializeSettings(AdPersonalizationActivity base) { - if (!base.getIntent().getExtras().getBoolean("revanced", false)) return false; + Bundle extras = base.getIntent().getExtras(); + if (extras != null && !extras.getBoolean("revanced", false)) return false; SettingsStatus.load();