From 89190cf8bb099f38123ea76b109d76ae84bc06fe Mon Sep 17 00:00:00 2001
From: Jeongseok Lee <jslee02@gmail.com>
Date: Sun, 3 May 2015 16:07:43 -0400
Subject: [PATCH] Fix incorrect state check in BVHModel::addVertex(~)

---
 src/BVH/BVH_model.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/BVH/BVH_model.cpp b/src/BVH/BVH_model.cpp
index 0ce41bfa..796ab746 100644
--- a/src/BVH/BVH_model.cpp
+++ b/src/BVH/BVH_model.cpp
@@ -160,7 +160,7 @@ int BVHModel<BV>::beginModel(int num_tris_, int num_vertices_)
 template<typename BV>
 int BVHModel<BV>::addVertex(const Vec3f& p)
 {
-  if(build_state != BVH_BUILD_STATE_UPDATE_BEGUN)
+  if(build_state != BVH_BUILD_STATE_BEGUN)
   {
     std::cerr << "BVH Warning! Call addVertex() in a wrong order. addVertex() was ignored. Must do a beginModel() to clear the model for addition of new vertices." << std::endl;
     return BVH_ERR_BUILD_OUT_OF_SEQUENCE;
-- 
GitLab