1
0
mirror of https://github.com/etesync/android synced 2025-01-11 08:10:58 +00:00

Null-pointer check for SIP address types (fixes #506)

This commit is contained in:
Ricki Hirner 2015-07-18 00:52:44 +02:00
parent ad733ebff1
commit 92966a5c57

View File

@ -635,6 +635,7 @@ public class LocalAddressBook extends LocalCollection<Contact> {
protected void populateSipAddress(Contact c, ContentValues row) {
try {
Impp impp = new Impp("sip:" + row.getAsString(SipAddress.SIP_ADDRESS));
if (row.containsKey(SipAddress.TYPE))
switch (row.getAsInteger(SipAddress.TYPE)) {
case SipAddress.TYPE_HOME:
impp.addType(ImppType.HOME);