Index: export_openscad.c =================================================================== --- export_openscad.c (revision 21307) +++ export_openscad.c (revision 21308) @@ -132,7 +132,7 @@ { const char *suffix = ".scad"; - if (PCB) + if ((PCB != NULL) && (openscad_attribute_list[HA_openscadfile].default_val.str_value == NULL)) pcb_derive_default_filename(PCB->Filename, &openscad_attribute_list[HA_openscadfile], suffix); if (n)