From eed9b1ce0be87a95b6c3c618d31a16209ccb8470 Mon Sep 17 00:00:00 2001
From: even <philippe.even@loria.fr>
Date: Mon, 12 Nov 2018 00:05:48 +0100
Subject: [PATCH] Singular segment initialization

---
 Code/Seg/BlurredSegment/blurredsegmentproto.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Code/Seg/BlurredSegment/blurredsegmentproto.cpp b/Code/Seg/BlurredSegment/blurredsegmentproto.cpp
index 6e2e1a6..8903390 100755
--- a/Code/Seg/BlurredSegment/blurredsegmentproto.cpp
+++ b/Code/Seg/BlurredSegment/blurredsegmentproto.cpp
@@ -254,6 +254,11 @@ BlurredSegment *BlurredSegmentProto::endOfBirth ()
   {
     Pt2i llast = plist->frontPoint ();
     Pt2i rlast = plist->backPoint ();
+    if (llast.equals (rlast)) // Strange, should not be flat, rightok or leftok
+    {
+      plist = NULL;
+      return (NULL);
+    }
     int xmin = llast.x ();
     if (rlast.x () < llast.x ()) xmin = rlast.x ();
     int ymin = llast.y ();
-- 
GitLab