Fixed a crash

This commit is contained in:
Pierre Pronchery 2010-05-11 15:38:58 +00:00
parent 77755a8b5f
commit db0e2a5f89

View File

@ -963,10 +963,10 @@ static int _gsm_parse_line(GSM * gsm, char const * line, gboolean * answered)
#endif #endif
if(answered != NULL) if(answered != NULL)
*answered = FALSE; *answered = FALSE;
if((gsmc = g_slist_nth_data(gsm->queue, 0)) != NULL) if((gsmc = g_slist_nth_data(gsm->queue, 0)) != NULL
cmd = gsm_command_get_command(gsmc); && (cmd = gsm_command_get_command(gsmc)) != NULL
if(strcmp(line, cmd) == 0) /* ignore echo */ && strcmp(line, cmd) == 0)
return 0; return 0; /* ignore echo */
if(strcmp(line, "RING") == 0) if(strcmp(line, "RING") == 0)
{ {
gsm_event(gsm, GSM_EVENT_TYPE_INCOMING_CALL, gsm_event(gsm, GSM_EVENT_TYPE_INCOMING_CALL,