From: mpv Date: Mon, 23 Apr 2018 07:58:42 +0000 (+0300) Subject: Fix for the issue #2461: crash when changing points on plane creation X-Git-Tag: V8_5_0rc2~8^2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a99b44f2a23d23faba4610092ac7929eeed6b06c;p=modules%2Fshaper.git Fix for the issue #2461: crash when changing points on plane creation --- diff --git a/src/ConstructionPlugin/ConstructionPlugin_Validators.cpp b/src/ConstructionPlugin/ConstructionPlugin_Validators.cpp index a3bd2bd53..146e3055a 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Validators.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Validators.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -212,6 +213,11 @@ bool ConstructionPlugin_ValidatorPlaneThreePoints::isValid(const AttributePtr& t std::shared_ptr aPnt2 = aVertex2->point(); std::shared_ptr aPnt3 = aVertex3->point(); + if (aPnt1->isEqual(aPnt2)) { + theError = "Selected points are equal"; + return false; + } + std::shared_ptr aLin(new GeomAPI_Lin(aPnt1, aPnt2)); if(aLin->contains(aPnt3)) {