Fix Notification registration crash when LpConfig not exist yet

This commit is contained in:
Erwan Croze 2017-03-07 10:13:34 +01:00
parent c5db56b3fa
commit 828ea5943d

View file

@ -1126,8 +1126,9 @@ public class LinphonePreferences {
} }
public void setPushNotificationRegistrationID(String regId) { public void setPushNotificationRegistrationID(String regId) {
getConfig().setString("app", "push_notification_regid", (regId != null) ? regId: ""); if (getConfig() == null) return;
setPushNotificationEnabled(isPushNotificationEnabled()); getConfig().setString("app", "push_notification_regid", (regId != null) ? regId: "");
setPushNotificationEnabled(isPushNotificationEnabled());
} }
public String getPushNotificationRegistrationID() { public String getPushNotificationRegistrationID() {