From cd57d75a599b6b98dcfb13b1fbed0cab0ba2f2b3 Mon Sep 17 00:00:00 2001
From: Aurelien Bricier <aurelien.bricier@c-s.fr>
Date: Wed, 3 Nov 2010 10:03:21 +0100
Subject: [PATCH] BUG: corrected the crash after attempting to add a second
 point

---
 Code/Visualization/otbVectorDataModel.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Code/Visualization/otbVectorDataModel.cxx b/Code/Visualization/otbVectorDataModel.cxx
index e1b019ae35..059f7230f8 100644
--- a/Code/Visualization/otbVectorDataModel.cxx
+++ b/Code/Visualization/otbVectorDataModel.cxx
@@ -57,6 +57,7 @@ void VectorDataModel::AddPointToGeometry(VertexType& vertex, bool callUpdate)
   if  (m_CurrentNodeType == FEATURE_POINT)
     {
     otbMsgDevMacro(<< "VectorDataModel::AddPointToGeometry: Creating and adding new point");
+    m_CurrentGeometry = NULL;
     if (m_CurrentGeometry.IsNull())
       {
       m_CurrentGeometry = DataNodeType::New();
-- 
GitLab