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.
This commit is contained in:
Ben Chan
2012-07-12 08:28:16 -07:00
committed by Aleksander Morgado
parent 107c78306e
commit 0519af932e

View File

@@ -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,