[chronojump] Avoid hung on no chronopic found after a disconnect



commit 085f4dc416304247334f8d6bd5789ace787e10b2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Oct 16 19:06:36 2020 +0200

    Avoid hung on no chronopic found after a disconnect

 src/chronopic2016.cs | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/chronopic2016.cs b/src/chronopic2016.cs
index 3f80ca8b..fb769657 100644
--- a/src/chronopic2016.cs
+++ b/src/chronopic2016.cs
@@ -284,6 +284,11 @@ public class Chronopic2016
        {
                LogB.Information("ChangeMultitestFirmwareMaybe (A)");
 
+               if(cp == null) {
+                       LogB.Information("Chronopic has been disconnected, cp == null");
+                       return false;
+               }
+
                cpDoing = cpCount;
 
                //---- 1


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