From 0767f1dbd8571852c233aa824f2aac56349b7f4f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 1 Feb 2010 12:02:38 -0600 Subject: [PATCH] Fix: Check if the command is still pending --- gatchat/gatchat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index b6550f9..e25bfd6 100644 --- a/gatchat/gatchat.c +++ b/gatchat/gatchat.c @@ -758,6 +758,9 @@ static gboolean wakeup_no_response(gpointer user) if (chat->debugf) chat->debugf("Wakeup got no response\n", chat->debug_data); + if (cmd == NULL) + return FALSE; + g_at_chat_finish_command(chat, FALSE, NULL); cmd = at_command_create(chat->wakeup, none_prefix, FALSE, NULL, wakeup_cb, chat, NULL, TRUE); -- 2.7.4