From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Sun, 7 Jun 2026 02:05:05 +0300
Subject: fix various memory leaks in LaunchActivity

---
 .../src/main/java/org/telegram/ui/LaunchActivity.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
@@ -6911,7 +6911,9 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati
                 getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback((OnBackInvokedCallback) onBackInvokedCallback);
             }
         }
-        Bulletin.removeDelegate(frameLayout);
+        if (frameLayout != null) {
+            Bulletin.removeDelegate(frameLayout);
+        }
         VideoAds.dropCache();
 
         clearFragments();
