mirror of https://github.com/ArduPilot/ardupilot
DataFlash_File: check fname before using it
This commit is contained in:
parent
74902012fd
commit
15265a45ed
|
@ -775,6 +775,9 @@ uint16_t DataFlash_File::start_new_log(void)
|
|||
log_num = 1;
|
||||
}
|
||||
char *fname = _log_file_name(log_num);
|
||||
if (fname == NULL) {
|
||||
return 0xFFFF;
|
||||
}
|
||||
_write_fd = ::open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666);
|
||||
_cached_oldest_log = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue