Fix race condition bug with account preference

This commit is contained in:
Erwan Croze 2017-05-18 15:55:17 +02:00
parent 243358ac03
commit ca572887b2

View file

@ -512,11 +512,8 @@ public class LinphonePreferences {
} }
public String getAccountDisplayName(int n) { public String getAccountDisplayName(int n) {
LinphoneAddress addr = getProxyConfig(n).getAddress(); if (getProxyConfig(n) == null || getProxyConfig(n).getAddress() == null) return null;
if(addr != null) { return getProxyConfig(n).getAddress().getDisplayName();
return addr.getDisplayName();
}
return null;
} }
public void setAccountUserId(int n, String userId) { public void setAccountUserId(int n, String userId) {