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:

committed by
Aleksander Morgado

parent
107c78306e
commit
0519af932e
@@ -450,7 +450,7 @@ serial_probe_at_parse_response (MMAtSerialPort *port,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!task->at_commands->response_processor (task->at_commands->command,
|
if (!task->at_commands->response_processor (task->at_commands->command,
|
||||||
response->str,
|
response ? response->str : NULL,
|
||||||
!!task->at_commands[1].command,
|
!!task->at_commands[1].command,
|
||||||
error,
|
error,
|
||||||
&result,
|
&result,
|
||||||
|
Reference in New Issue
Block a user