Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31fd2292 authored by jsh's avatar jsh
Browse files

Make sure smsHeader != null before using it.

Fixes bug 1866578 - NPE while trying to dispatch a non-concatenated SMS with
no user data header (ie, your typical SMS).
parent a5ca3425
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ final class CdmaSMSDispatcher extends SMSDispatcher {
            byte[][] pdus = new byte[1][];
            pdus[0] = sms.getPdu();

            if (smsHeader.portAddrs != null) {
            if (smsHeader != null && smsHeader.portAddrs != null) {
                if (smsHeader.portAddrs.destPort == SmsHeader.PORT_WAP_PUSH) {
                    // GSM-style WAP indication
                    mWapPush.dispatchWapPdu(sms.getUserData());
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ final class GsmSMSDispatcher extends SMSDispatcher {
            byte[][] pdus = new byte[1][];
            pdus[0] = sms.getPdu();

            if (smsHeader.portAddrs != null) {
            if (smsHeader != null && smsHeader.portAddrs != null) {
                if (smsHeader.portAddrs.destPort == SmsHeader.PORT_WAP_PUSH) {
                    mWapPush.dispatchWapPdu(sms.getUserData());
                }