From 0519af932e5306ecb6c7ae7c37bc11ab1ffbd73f Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Thu, 12 Jul 2012 08:28:16 -0700 Subject: [PATCH] port-probe: fix crash in serial_probe_at_parse_response due to NULL response When the serial port is not open, internal_queue_command (mm-serial-port.c) invokes serial_probe_at_parse_response (mm-port-probe.c) with a NULL response. This patch modifies serial_probe_at_parse_response to handle NULL response properly. --- src/mm-port-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index baadee01..1d630a43 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -450,7 +450,7 @@ serial_probe_at_parse_response (MMAtSerialPort *port, } if (!task->at_commands->response_processor (task->at_commands->command, - response->str, + response ? response->str : NULL, !!task->at_commands[1].command, error, &result,