diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-27 21:53:39 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-27 21:53:39 (GMT) |
commit | 1f67e60eae04977c1d1e3b214c7de141c62988dd (patch) | |
tree | 07baec4cb2eb223d0872dcb13d90a38e05c86cff /tests/csgtestcore.cc | |
parent | c2fd035d02f8cf9cea216f34f02dd3f5f6bc5e2a (diff) |
fix crash
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r-- | tests/csgtestcore.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index efecf5e..8182d36 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -35,8 +35,10 @@ QString librarydir; //#define DEBUG -struct CsgInfo +class CsgInfo { +public: + CsgInfo(); CSGTerm *root_norm_term; // Normalized CSG products class CSGChain *root_chain; std::vector<CSGTerm*> highlight_terms; @@ -46,6 +48,16 @@ struct CsgInfo OffscreenView *glview; }; +CsgInfo::CsgInfo() { + root_norm_term = NULL; + root_chain = NULL; + highlight_terms = vector<CSGTerm*>(); + highlights_chain = NULL; + background_terms = vector<CSGTerm*>(); + background_chain = NULL; + glview = NULL; +} + AbstractNode *find_root_tag(AbstractNode *n) { foreach(AbstractNode *v, n->children) { @@ -144,7 +156,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) Tree tree(root_node); - CsgInfo csgInfo; + CsgInfo csgInfo = CsgInfo(); CGALEvaluator cgalevaluator(tree); CSGTermEvaluator evaluator(tree, &cgalevaluator.psevaluator); CSGTerm *root_raw_term = evaluator.evaluateCSGTerm(*root_node, |