diff --git a/src/slic3r.cpp b/src/slic3r.cpp index bced1a123..ef8e8c5e7 100644 --- a/src/slic3r.cpp +++ b/src/slic3r.cpp @@ -56,7 +56,7 @@ int CLI::run(int argc, char **argv) { if (cli_transform_config_def.has(opt_key)) this->transforms.push_back(opt_key); } // load config files supplied via --load - for (auto const &file : config.getStrings("load")) { + for (auto const &file : config.getStrings("load",{})) { try{ if (!boost::filesystem::exists(file)) { if (config.getBool("ignore_nonexistent_file", false)) { @@ -314,10 +314,10 @@ int CLI::run(int argc, char **argv) { boost::nowide::cout << msg << std::endl; }; print.apply_config(this->print_config); - print.arrange = !this->config.getBool("dont_arrange"); + print.arrange = !this->config.getBool("dont_arrange",false); print.center = !this->config.has("center") && !this->config.has("align_xy") - && !this->config.getBool("dont_arrange"); + && !this->config.getBool("dont_arrange",false); Slic3r::Log::error("CLI") << "Arrange: " << print.arrange<< ", center: " << print.center << std::endl; print.set_model(model); @@ -435,7 +435,7 @@ CLI::output_filepath(const Model &model, IO::ExportFormat format) const { const std::string filename = pp.process(filename_format); // use --output when available - std::string outfile{ this->config.getString("output") }; + std::string outfile{ this->config.getString("output","") }; if (!outfile.empty()) { // if we were supplied a directory, use it and append our automatically generated filename const boost::filesystem::path out(outfile);