From: vsv Date: Wed, 15 Apr 2020 10:32:46 +0000 (+0300) Subject: Avoid crash if sensitivity is set to 0 X-Git-Tag: V9_5_0b1~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=efdc507e481ea68b5e73f0df175390609b8a60e7;p=modules%2Fshaper.git Avoid crash if sensitivity is set to 0 --- diff --git a/src/XGUI/XGUI_SelectionActivate.cpp b/src/XGUI/XGUI_SelectionActivate.cpp index 10b1d84e5..8ce0dbbcd 100644 --- a/src/XGUI/XGUI_SelectionActivate.cpp +++ b/src/XGUI/XGUI_SelectionActivate.cpp @@ -359,6 +359,8 @@ void XGUI_SelectionActivate::activateAIS(const Handle(AIS_InteractiveObject)& th (theMode == getSelectionMode(TopAbs_WIRE))) aPrecision = theIO->Width() + ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", "edge-selection-sensitivity", 2); + if (aPrecision <= 0) + aPrecision = 2; aContext->SetSelectionSensitivity(theIO, theMode, aPrecision); }