Gui: [skip ci] handle possible division by zero in NaviCube

This commit is contained in:
wmayer
2020-02-03 14:39:54 +01:00
parent f66f18c459
commit 49cb974bca

View File

@@ -1157,7 +1157,8 @@ bool NaviCubeImplementation::mouseReleased(short x, short y) {
int pick = pickFace(x, y);
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
float rotStepAngle = 360.0f/hGrp->GetInt("NaviStepByTurn",8);
long step = Base::clamp(hGrp->GetInt("NaviStepByTurn",8), 4L, 36L);
float rotStepAngle = 360.0f/step;
switch (pick) {
default: