mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Catch overflow exception handling bounding box
This commit is contained in:
@@ -2445,7 +2445,14 @@ namespace renderdocui.Windows
|
||||
ui.m_MinBounds[CurPosElement].z + diag.z / 2.0f);
|
||||
m_Arcball.SetDistance(diag.Length()*0.7f);
|
||||
|
||||
camSpeed.Value = Helpers.Clamp((decimal)(diag.Length() / 200.0f), camSpeed.Minimum, camSpeed.Maximum);
|
||||
try
|
||||
{
|
||||
camSpeed.Value = Helpers.Clamp((decimal)(diag.Length() / 200.0f), camSpeed.Minimum, camSpeed.Maximum);
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
camSpeed.Value = (decimal)1.0f;
|
||||
}
|
||||
|
||||
render.Invalidate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user