[chronojump] Fix a potential crash on forceSensor capture with path



commit 6972e9ce370ac964db072f4a4c57bc15d34a6b14
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jun 4 16:11:07 2021 +0200

    Fix a potential crash on forceSensor capture with path

 src/gui/app1/forceSensor.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 8383e0a2f..73246ff51 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1574,7 +1574,8 @@ LogB.Information(" fs E ");
                        string accuracyStr = "";
                        if(interpolate_l != null)
                        {
-                               if(fscPoints != null) {
+                               if(fscPoints != null && fscPoints.GetLength() > 1) //to ensure 
fscPoints.GetLastTime() works
+                               {
                                        int countDown = 
Convert.ToInt32(UtilAll.DivideSafe(pathAccuracyCountdownMicros - fscPoints.GetLastTime(), 1000000));
                                        if(countDown >= 0)
                                                accuracyStr = string.Format(" - Accuracy calculation starts 
in <b>{0}</b> s", countDown);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]