Fix (by inspection) NPE reported through google

This commit is contained in:
Eric House 2014-07-24 21:20:15 -07:00
parent 33bbbfeec7
commit c3f4e5323c

View file

@ -45,6 +45,10 @@ public class SMSReceiver extends BroadcastReceiver {
for ( int ii = 0; ii < pdus.length; ++ii ) {
SmsMessage sms = SmsMessage.createFromPdu((byte[])pdus[ii]);
if ( null == sms ) {
continue;
}
String phone = sms.getOriginatingAddress();
if ( isData ) {
byte[] body = sms.getUserData();