diff options
author | Ben Chan <benchan@chromium.org> | 2012-07-12 08:28:16 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-12 22:58:58 +0200 |
commit | 0519af932e5306ecb6c7ae7c37bc11ab1ffbd73f (patch) | |
tree | 8ec07d69584be0c8b64834f5f5bc26c069f596e0 /src | |
parent | 107c78306ef9ff32dc0b3434cb0aa064df8f2233 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-port-probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |