diff --git a/libraries/SITL/SIM_Frame.cpp b/libraries/SITL/SIM_Frame.cpp index f0fefe09ed..639b6deecd 100644 --- a/libraries/SITL/SIM_Frame.cpp +++ b/libraries/SITL/SIM_Frame.cpp @@ -333,6 +333,9 @@ void Frame::load_frame_params(const char *model_json) fname = strdup(model_json); } else { IGNORE_RETURN(asprintf(&fname, "@ROMFS/models/%s", model_json)); + if (AP::FS().stat(model_json, &st) != 0) { + AP_HAL::panic("%s failed to load\n", model_json); + } } if (fname == nullptr) { AP_HAL::panic("%s failed to load\n", model_json);