Bug 837875 - java.lang.NullPointerException: at org.mozilla.gecko.sync.setup.activities.SendTabActivity.getOtherClients(SendTabActivity.java). r=nalexander
authorRichard Newman <rnewman@mozilla.com>
Tue, 26 Feb 2013 13:44:24 -0800
changeset 123088 83c19059e39674a7fd843dd5cf7698b69d0d4d09
parent 123087 f246412bcadb5e89555cc0cc3eb8d7743fe94c2d
child 123089 a0d8482e5532348572e05f63bc07e593cba81c84
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs837875
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 837875 - java.lang.NullPointerException: at org.mozilla.gecko.sync.setup.activities.SendTabActivity.getOtherClients(SendTabActivity.java). r=nalexander
mobile/android/base/sync/setup/activities/SendTabActivity.java
--- a/mobile/android/base/sync/setup/activities/SendTabActivity.java
+++ b/mobile/android/base/sync/setup/activities/SendTabActivity.java
@@ -281,18 +281,22 @@ public class SendTabActivity extends Act
    * @return a collection of client records, excluding our own.
    */
   protected Collection<ClientRecord> getOtherClients() {
     final Map<String, ClientRecord> all = getAllClients();
     if (all == null) {
       return new ArrayList<ClientRecord>(0);
     }
 
+    final String ourGUID = getAccountGUID();
+    if (ourGUID == null) {
+      return all.values();
+    }
+
     final ArrayList<ClientRecord> out = new ArrayList<ClientRecord>(all.size());
-    final String ourGUID = getAccountGUID();
     for (Entry<String, ClientRecord> entry : all.entrySet()) {
       if (ourGUID.equals(entry.getKey())) {
         continue;
       }
       out.add(entry.getValue());
     }
     return out;
   }