Skip to content

Commit

Permalink
IfcConvert: proper "exit routine" if initialization of input fails wh…
Browse files Browse the repository at this point in the history
…en trying to create geometry files.
  • Loading branch information
Stinkfist0 authored and aothms committed Oct 15, 2018
1 parent c420cc1 commit 2024a24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ifcconvert/IfcConvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ int main(int argc, char** argv)

if (use_element_hierarchy && output_extension != ".dae") {
std::cerr << "[Error] --use-element-hierarchy can be used only with .dae output.\n";
/// @todo Lots of duplicate error-and-exit code.
write_log(!quiet);
print_usage();
delete serializer;
Expand Down Expand Up @@ -628,6 +629,9 @@ int main(int argc, char** argv)
time(&start);

if (!init_input_file(input_filename, ifc_file, no_progress || quiet, mmap)) {
write_log(!quiet);
delete serializer;
std::remove(output_temp_filename.c_str()); /**< @todo Windows Unicode support */
return EXIT_FAILURE;
}

Expand Down

0 comments on commit 2024a24

Please sign in to comment.