OSDN Git Service

Don't crash on transport unregistration if there is no current transport
authorChristopher Tate <ctate@google.com>
Sat, 30 Jan 2010 00:27:04 +0000 (16:27 -0800)
committerChristopher Tate <ctate@google.com>
Sat, 30 Jan 2010 00:27:04 +0000 (16:27 -0800)
Change-Id: Icd0962254ba224a7be27d408dffb25b634f67863

services/java/com/android/server/BackupManagerService.java

index ee68a50..62dcb08 100644 (file)
@@ -641,7 +641,7 @@ class BackupManagerService extends IBackupManager.Stub {
                 mTransports.put(name, transport);
             } else {
                 mTransports.remove(name);
-                if (mCurrentTransport.equals(name)) {
+                if ((mCurrentTransport != null) && mCurrentTransport.equals(name)) {
                     mCurrentTransport = null;
                 }
                 // Nothing further to do in the unregistration case