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

Commit 84780f56 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't crash if the Backup Manager returns a null RestoreSet[]

parent b99ab30c
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ public final class Bmgr {
                return;
            }
            RestoreSet[] sets = mRestore.getAvailableRestoreSets();
            if (sets != null) {
                for (RestoreSet s : sets) {
                    if (s.token == token) {
                        System.out.println("Scheduling restore: " + s.name);
@@ -319,6 +320,7 @@ public final class Bmgr {
                        break;
                    }
                }
            }
            if (!didRestore) {
                if (sets == null || sets.length == 0) {
                    System.out.println("No available restore sets; no restore performed");