isimodem: fix crash in sms driver

This commit is contained in:
Pekka Pessi 2011-02-01 22:37:09 +02:00 committed by Aki Niemi
parent 51159b7610
commit e8d681f86d
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ static void isi_sca_query(struct ofono_sms *sms,
1, /* Location, default is 1 */
};
if (cbd == NULL || sd == NULL)
if (cbd == NULL || sd == NULL || sd->sim == NULL)
goto error;
if (g_isi_client_send(sd->sim, msg, sizeof(msg),