[chronojump] Fixed crash if force sensor load an empty file
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed crash if force sensor load an empty file
- Date: Fri, 15 Jun 2018 09:39:26 +0000 (UTC)
commit c7fbf419bca0bb11c0d49be46f3516e8a7d38cd6
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jun 15 11:38:45 2018 +0200
Fixed crash if force sensor load an empty file
src/gui/forceSensorAnalyze.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/forceSensorAnalyze.cs b/src/gui/forceSensorAnalyze.cs
index cfae70a0..11eea99f 100644
--- a/src/gui/forceSensorAnalyze.cs
+++ b/src/gui/forceSensorAnalyze.cs
@@ -684,6 +684,9 @@ public partial class ChronoJumpWindow
private void forceSensorAnalyzeManualGraphDo(Rectangle allocation)
{
+ if(fsAI.GetLength() == 0)
+ return;
+
LogB.Information("forceSensorAnalyzeManualGraphDo() START");
bool debug = false;
@@ -883,7 +886,7 @@ public partial class ChronoJumpWindow
bool forceSensorAIChanged = false;
private void on_hscale_force_sensor_ai_a_value_changed (object o, EventArgs args)
{
- if(fsAI == null)
+ if(fsAI == null || fsAI.GetLength() == 0)
return;
int count = Convert.ToInt32(hscale_force_sensor_ai_a.Value);
@@ -903,7 +906,7 @@ public partial class ChronoJumpWindow
}
private void on_hscale_force_sensor_ai_b_value_changed (object o, EventArgs args)
{
- if(fsAI == null)
+ if(fsAI == null || fsAI.GetLength() == 0)
return;
int count = Convert.ToInt32(hscale_force_sensor_ai_b.Value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]