mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: check for alloc failure of ObjectBuffer
This commit is contained in:
parent
6e6df75b2a
commit
da4a9297a0
|
@ -44,7 +44,7 @@ bool GCS_MAVLINK::ftp_init(void) {
|
|||
}
|
||||
|
||||
ftp.requests = new ObjectBuffer<pending_ftp>(5);
|
||||
if (ftp.requests == nullptr) {
|
||||
if (ftp.requests == nullptr || ftp.requests->get_size() == 0) {
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue