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

Commit e8b4fd26 authored by satok's avatar satok
Browse files

fix possible NPE in DebugSettings

Change-Id: I44ec5bd3b2a00087603316f14d732164dbcf399f
parent 6512cd28
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -107,6 +107,9 @@ public final class DebugSettings extends PreferenceFragment
        String version = "";
        try {
            final Context context = getActivity();
            if (context == null) {
                return;
            }
            final String packageName = context.getPackageName();
            PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0);
            version = "Version " + info.versionName;