diff --git a/src/systemcmds/param/param.cpp b/src/systemcmds/param/param.cpp index f70f4e2211..90def735cb 100644 --- a/src/systemcmds/param/param.cpp +++ b/src/systemcmds/param/param.cpp @@ -395,7 +395,11 @@ do_load(const char *param_file_name) } if (result < 0) { - PX4_ERR("importing from '%s' failed (%i)", param_file_name, result); + if (param_file_name) { + PX4_ERR("importing from '%s' failed (%i)", param_file_name, result); + } else { + PX4_ERR("importing failed (%i)", result); + } return 1; } @@ -421,7 +425,11 @@ do_import(const char *param_file_name) } if (result < 0) { - PX4_ERR("importing from '%s' failed (%i)", param_file_name, result); + if (param_file_name) { + PX4_ERR("importing from '%s' failed (%i)", param_file_name, result); + } else { + PX4_ERR("importing failed (%i)", result); + } return 1; }