Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e98f5ed
)
#878 Segmentation fault when setting distance on the two same points
author
nds
<nds@opencascade.com>
Mon, 7 Sep 2015 13:20:18 +0000
(16:20 +0300)
committer
nds
<nds@opencascade.com>
Mon, 7 Sep 2015 13:20:47 +0000
(16:20 +0300)
Crash by click in the same point, caused by OCCT dir2d
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
patch
|
blob
|
history
diff --git
a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
index 6b1dd6bece6a3310ce855309214503d4fb86bdb9..7eeee42670cd1c92051ff22e969147ea675eb403 100644
(file)
--- a/
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
+++ b/
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
@@
-277,6
+277,9
@@
void SketchPlugin_ConstraintDistance::attributeChanged(const std::string& theID)
} else
return;
+ if (aEndPnt->distance(aStartPnt) < tolerance)
+ return;
+
std::shared_ptr<GeomAPI_Dir2d> aLineDir(new GeomAPI_Dir2d(aEndPnt->decreased(aStartPnt)));
std::shared_ptr<GeomAPI_XY> aFlyoutDir = aFlyoutPnt->xy()->decreased(aStartPnt);