From 2bf8bb9d45316a835af6d0abfddcdd5838f9a69e Mon Sep 17 00:00:00 2001 From: Guillaume Zajac Date: Tue, 26 Jun 2012 10:12:59 +0200 Subject: gatserver: Add NULL check to avoid crash Dundee is not waiting to receive the NO CARRIER notification to close the IO channel with oFono so that oFono is trying to send a NO CARRIER although GAtServer is removed. --- gatchat/gatserver.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gatchat') diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 7c87c7ae..e3cbb8f0 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -222,6 +222,9 @@ static inline void send_final_numeric(GAtServer *server, GAtServerResult result) void g_at_server_send_final(GAtServer *server, GAtServerResult result) { + if (server == NULL) + return; + if (server->final_sent != FALSE) return; -- cgit v1.2.3