Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1b96103 authored by John Reck's avatar John Reck
Browse files

Fix NPE if app context is null

Change-Id: Ic21ae50e5421a8c711e133ffe2ff218160382297
Fixes: 74260094
Test: builds, boots, and graphicsstats still works
parent 20ebb0a6
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1068,12 +1068,16 @@ public final class ThreadedRenderer {
            mInitialized = true;
            mAppContext = context.getApplicationContext();

            nSetDebuggingEnabled(
                    (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0
                    || Build.IS_DEBUGGABLE);
            initSched(renderProxy);

            if (mAppContext != null) {
                final boolean appDebuggable =
                        (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)
                        != 0;
                nSetDebuggingEnabled(appDebuggable || Build.IS_DEBUGGABLE);
                initGraphicsStats();
            }
        }

        private void initSched(long renderProxy) {
            try {