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

Commit 0d829e45 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Frameworks/base: Fix null-pointer access

Fix a guaranteed null-pointer access in ProcessStats.

Change-Id: I29d6156518fc225ca65afbb3a7aaae860d1ac560
parent 30fcd2aa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3399,10 +3399,11 @@ public final class ProcessStats implements Parcelable {
                            + pkgList.keyAt(index) + "/" + proc.mUid
                            + " for multi-proc " + proc.mName + " version " + proc.mVersion);
                }
                String savedName = proc.mName;
                proc = pkg.mProcesses.get(proc.mName);
                if (proc == null) {
                    throw new IllegalStateException("Didn't create per-package process "
                            + proc.mName + " in pkg " + pkg.mPackageName + "/" + pkg.mUid);
                            + savedName + " in pkg " + pkg.mPackageName + "/" + pkg.mUid);
                }
                holder.state = proc;
            }