atutil: Handle empty SIM state polling request gracefully

This commit is contained in:
Marcel Holtmann 2011-08-03 14:27:17 +02:00
parent 8cfab5328c
commit 3ab79d8718
1 changed files with 3 additions and 0 deletions

View File

@ -581,6 +581,9 @@ struct at_util_sim_state_query *at_util_sim_state_query_new(GAtChat *chat,
void at_util_sim_state_query_free(struct at_util_sim_state_query *req)
{
if (req == NULL)
return;
if (req->cpin_poll_source > 0)
g_source_remove(req->cpin_poll_source);