From ff2f42016a5675ef723f8fb0fd01ab04dac8d9cc Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Wed, 30 Sep 2026 08:04:14 -0500 Subject: [PATCH] Fix CLI crash on a 3mf without project settings (#16004) When a 3mf is tagged as written by OrcaSlicer or BambuStudio, the CLI treats it as a project and reads the printer settings stored in the file. #14580 guarded four of those reads, but printable_height still called opt_float() without a check, so a 3mf whose project_settings.config is empty or missing crashed with a null dereference. The handy models OrcaBadge.3mf and OrcaSliced.3mf are both like this. Skip the read when the option is absent, like the reads around it. The bed-size logic further down already treats an old printable height of 0 as unknown and uses the current printer's. --- src/OrcaSlicer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index 3ed76b8976..87352f505e 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -1913,7 +1913,8 @@ int CLI::run(int argc, char **argv) old_printable_width = static_cast(old_printable_bbox.size().x()); old_printable_depth = static_cast(old_printable_bbox.size().y()); } - old_printable_height = (int)(config.opt_float("printable_height")); + if (config.option("printable_height")) + old_printable_height = (int)(config.opt_float("printable_height")); if (config.option("extruder_clearance_height_to_rod")) old_height_to_rod = config.opt_float("extruder_clearance_height_to_rod");