diff options
author | Marius Kintel <marius@kintel.net> | 2012-04-03 23:47:55 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-04-03 23:47:55 (GMT) |
commit | cab12ccb86e03535cdafc7357dbbc0b5d2ba1fa2 (patch) | |
tree | 815a5b57e0c8374020d62e6014ee4c88bc6971a8 /src/csgtermnormalizer.cc | |
parent | d755dd61de6c3dd988ebe4eab005db145bbbb568 (diff) | |
parent | 2c2731598aac00589be3f525687e0b3d272ed7eb (diff) |
Merge branch 'master' into value
Diffstat (limited to 'src/csgtermnormalizer.cc')
-rw-r--r-- | src/csgtermnormalizer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/csgtermnormalizer.cc b/src/csgtermnormalizer.cc index 0e7a759..b4bfa4c 100644 --- a/src/csgtermnormalizer.cc +++ b/src/csgtermnormalizer.cc @@ -44,9 +44,10 @@ shared_ptr<CSGTerm> CSGTermNormalizer::normalizePass(shared_ptr<CSGTerm> term) do { while (term && normalize_tail(term)) { } if (!term || term->type == CSGTerm::TYPE_PRIMITIVE) return term; - term->left = normalizePass(term->left); + if (term->left) term->left = normalizePass(term->left); } while (term->type != CSGTerm::TYPE_UNION && - (term->right->type != CSGTerm::TYPE_PRIMITIVE || term->left->type == CSGTerm::TYPE_UNION)); + (term->right && term->right->type != CSGTerm::TYPE_PRIMITIVE || + term->left && term->left->type == CSGTerm::TYPE_UNION)); term->right = normalizePass(term->right); // FIXME: Do we need to take into account any transformation of item here? |