mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 08:23:56 -04:00
GCS_MAVLink: check for alloc failure of ObjectBuffer
This commit is contained in:
parent
4bd058d415
commit
88afd4a4cb
@ -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
Block a user