bugfix: Fix assertion fail trying to export a non-2D file to dxf

felipesanches-svg
Marius Kintel 2011-12-27 03:44:48 +01:00
parent bc3454f369
commit 27983e001b
1 changed files with 4 additions and 0 deletions

View File

@ -364,6 +364,10 @@ int main(int argc, char **argv)
}
if (dxf_output_file) {
if (root_N.dim != 2) {
fprintf(stderr, "Current top level object is not a 2D object.\n");
exit(1);
}
std::ofstream fstream(dxf_output_file);
if (!fstream.is_open()) {
PRINTF("Can't open file \"%s\" for export", dxf_output_file);