Add security to prevent liblinphone crash

This commit is contained in:
Sylvain Berfini 2012-10-26 11:13:32 +02:00
parent fc2ef8c693
commit d9667e4bc0

View file

@ -608,7 +608,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
String username = getPrefString(getString(R.string.pref_username_key) + key, null);
String password = getPrefString(getString(R.string.pref_passwd_key) + key, null);
String domain = getPrefString(getString(R.string.pref_domain_key) + key, null);
if (username != null && username.length() > 0) {
if (username != null && username.length() > 0 && password != null) {
LinphoneAuthInfo lAuthInfo = LinphoneCoreFactory.instance().createAuthInfo(username, password, null);
mLc.addAuthInfo(lAuthInfo);