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

Commit 519689eb authored by Lin Ma's avatar Lin Ma
Browse files

Settings: Fix a fatal exception caused by null pointer

* In createPreferences, findRecordBySlotId might return null

Change-Id: Icc4035e419dd16147595b84652489c631f8903c7
parent 6acaca1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
        mSimEnablers = new ArrayList<MultiSimEnablerPreference>(mNumSlots);
        for (int i = 0; i < mNumSlots; ++i) {
            final SubInfoRecord sir = findRecordBySlotId(i);
            if (mNumSlots > 1) {
            if (mNumSlots > 1 && sir != null) {
                MultiSimEnablerPreference multiSimEnablerPreference =
                        new MultiSimEnablerPreference(getActivity(), sir, mHandler, sir.slotId);
                if (!getResources()