From 757820fe1c67290328c77802ea7718505b77f437 Mon Sep 17 00:00:00 2001 From: Justin C Date: Sat, 2 Feb 2013 02:11:42 -0800 Subject: missing NULL check when normalization exceeds limit for elements diff --git a/src/csgtermnormalizer.cc b/src/csgtermnormalizer.cc index e2474e9..81fab80 100644 --- a/src/csgtermnormalizer.cc +++ b/src/csgtermnormalizer.cc @@ -20,7 +20,7 @@ shared_ptr CSGTermNormalizer::normalize(const shared_ptr &root PRINTB("WARNING: Normalized tree is growing past %d elements. Aborting normalization.\n", this->limit); // Clean up any partially evaluated terms shared_ptr newroot = root, tmproot; - while (newroot != tmproot) { + while (newroot && newroot != tmproot) { tmproot = newroot; newroot = collapse_null_terms(tmproot); } -- cgit v0.10.1