From 27983e001b574eb5087a7d4cc6d33871891a9478 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 27 Dec 2011 03:44:48 +0100 Subject: bugfix: Fix assertion fail trying to export a non-2D file to dxf diff --git a/src/openscad.cc b/src/openscad.cc index 0d5b25e..c6dd7b6 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -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); -- cgit v0.10.1