Prevent weird Magisk version number crashing app

This commit is contained in:
topjohnwu 2016-10-18 21:54:53 +08:00
parent 906ae730e9
commit e5be8b7f67

View File

@ -167,10 +167,10 @@ public class MagiskFragment extends Fragment {
private void updateMagiskVersion() {
List<String> ret = Shell.sh("getprop magisk.version");
if (ret.get(0).isEmpty()) {
magiskVersion = -1;
} else {
try {
magiskVersion = Integer.parseInt(ret.get(0));
} catch (NumberFormatException e) {
magiskVersion = -1;
}
if (magiskVersion == -1) {