summaryrefslogtreecommitdiffstats
path: root/cmds/bmgr
diff options
context:
space:
mode:
authorChristopher Tate <ctate@android.com>2009-08-07 15:40:35 -0700
committerChristopher Tate <ctate@android.com>2009-08-07 15:50:02 -0700
commit84780f56f441deb4ff736987986daeaf64db17a4 (patch)
tree8bfa903dfd7770403b27f0a2e4fdacc33fcd8e01 /cmds/bmgr
parentb99ab30cbc98ec38d514bbd11197a6abf1c104b5 (diff)
downloadframeworks_base-84780f56f441deb4ff736987986daeaf64db17a4.zip
frameworks_base-84780f56f441deb4ff736987986daeaf64db17a4.tar.gz
frameworks_base-84780f56f441deb4ff736987986daeaf64db17a4.tar.bz2
Don't crash if the Backup Manager returns a null RestoreSet[]
Diffstat (limited to 'cmds/bmgr')
-rw-r--r--cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index a79d0cb..6b6d3c9 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -311,12 +311,14 @@ public final class Bmgr {
return;
}
RestoreSet[] sets = mRestore.getAvailableRestoreSets();
- for (RestoreSet s : sets) {
- if (s.token == token) {
- System.out.println("Scheduling restore: " + s.name);
- mRestore.performRestore(token, observer);
- didRestore = true;
- break;
+ if (sets != null) {
+ for (RestoreSet s : sets) {
+ if (s.token == token) {
+ System.out.println("Scheduling restore: " + s.name);
+ mRestore.performRestore(token, observer);
+ didRestore = true;
+ break;
+ }
}
}
if (!didRestore) {