diff --git a/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java index 77b46276ae..534aa50a7e 100644 --- a/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java @@ -234,7 +234,9 @@ public class AdvancedPreferenceFragment extends PreferenceFragment { Log.w(TAG, e); } - GoogleCloudMessaging.getInstance(context).unregister(); + if (!TextSecurePreferences.isGcmDisabled(context)) { + GoogleCloudMessaging.getInstance(context).unregister(); + } return SUCCESS; } catch (IOException ioe) {