From fcb4b74d9ae5d06660c82d4714dc0fb5efabf9d0 Mon Sep 17 00:00:00 2001 From: clifford Date: Sat, 9 Jan 2010 22:43:33 +0000 Subject: Clifford Wolf & Marius Kintel: Fixed memory corruption git-svn-id: http://svn.clifford.at/openscad/trunk@257 b57f626f-c46c-0410-a088-ec61d464b74c diff --git a/MainWindow.h b/MainWindow.h index 9c4e51a..40af75b 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -21,6 +21,7 @@ public: Context root_ctx; AbstractModule *root_module; // Result of parsing + ModuleInstantiation root_inst; // Top level instance AbstractNode *absolute_root_node; // Result of tree evaluation AbstractNode *root_node; // Root if the root modifier (!) is used diff --git a/mainwin.cc b/mainwin.cc index 7433def..8265b6a 100644 --- a/mainwin.cc +++ b/mainwin.cc @@ -518,10 +518,8 @@ void MainWindow::compile(bool procevents) QApplication::processEvents(); AbstractNode::idx_counter = 1; - { - ModuleInstantiation root_inst; - absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); - } + root_inst = ModuleInstantiation(); + absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); if (!absolute_root_node) goto fail; -- cgit v0.10.1