Sketcher: prevent crash when accessing null pointer
This commit is contained in:
@@ -1208,6 +1208,11 @@ Base::Vector3d EditModeConstraintCoinManager::seekConstraintPosition(const Base:
|
||||
relPos = norm * 0.5f + dir * multiplier;
|
||||
freePos = origPos + relPos * scaled_step;
|
||||
|
||||
// Prevent crash : https://forum.freecadweb.org/viewtopic.php?f=8&t=65305
|
||||
if (!rp) {
|
||||
return relPos * step;
|
||||
}
|
||||
|
||||
rp->setRadius(0.1f);
|
||||
rp->setPickAll(true);
|
||||
rp->setRay(SbVec3f(freePos.x, freePos.y, -1.f), SbVec3f(0, 0, 1) );
|
||||
|
||||
Reference in New Issue
Block a user