Testing object before use it
This commit is contained in:
parent
ccfbf6d5e1
commit
1ac2ff5784
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ public class LinphonePreferences {
|
||||||
|
|
||||||
private LinphoneAuthInfo getAuthInfo(int n) {
|
private LinphoneAuthInfo getAuthInfo(int n) {
|
||||||
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
LinphoneProxyConfig prxCfg = getProxyConfig(n);
|
||||||
|
if (prxCfg == null) return null;
|
||||||
try {
|
try {
|
||||||
LinphoneAddress addr = LinphoneCoreFactory.instance().createLinphoneAddress(prxCfg.getIdentity());
|
LinphoneAddress addr = LinphoneCoreFactory.instance().createLinphoneAddress(prxCfg.getIdentity());
|
||||||
LinphoneAuthInfo authInfo = getLc().findAuthInfo(addr.getUserName(), null, addr.getDomain());
|
LinphoneAuthInfo authInfo = getLc().findAuthInfo(addr.getUserName(), null, addr.getDomain());
|
||||||
|
|
Loading…
Reference in a new issue