diff --git a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java index 2142648b1f1a009c8ad705f85e34eabd6f3050e4..389f6296cd124efeb8d234479709a94a051ce1e7 100644 --- a/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java +++ b/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java @@ -490,7 +490,10 @@ public class McsService extends Service implements Handler.Callback { NetworkInfo activeNetworkInfo = cm.getActiveNetworkInfo(); activeNetworkPref = GcmPrefs.get(this).getNetworkPrefForInfo(activeNetworkInfo); if (!GcmPrefs.get(this).isEnabledFor(activeNetworkInfo)) { - logd(this, "Don't connect, because disabled for " + activeNetworkInfo.getTypeName()); + final String typeName = + activeNetworkInfo != null ? activeNetworkInfo.getTypeName() : ""; + + logd(this, "Don't connect, because disabled for " + typeName); scheduleReconnect(this); return; }