[chronojump] Fixes to not crash if no jump types
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixes to not crash if no jump types
- Date: Tue, 2 Aug 2022 12:57:13 +0000 (UTC)
commit e8faa036a8f6a60f0835c5423a077da8920857d5
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Aug 2 14:56:47 2022 +0200
Fixes to not crash if no jump types
src/gui/app1/chronojump.cs | 5 +++--
src/gui/app1/jump.cs | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 486e74cb8..baacc6325 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1396,8 +1396,9 @@ public partial class ChronoJumpWindow
if(! configChronojump.Exhibition)
updateGraphJumpsSimple();
- update_label_extra_window_jumps_radiobutton_weight_percent_as_kg(
- (currentJumpType.HasWeight &&
extra_window_jumps_radiobutton_weight.Active));
+ if(currentJumpType != null)
+ update_label_extra_window_jumps_radiobutton_weight_percent_as_kg(
+ (currentJumpType.HasWeight &&
extra_window_jumps_radiobutton_weight.Active));
if(notebook_analyze.CurrentPage ==
Convert.ToInt32(notebook_analyze_pages.JUMPSPROFILE))
jumpsProfileDo(true); //calculate data
diff --git a/src/gui/app1/jump.cs b/src/gui/app1/jump.cs
index 63d5f5083..34c35bd9b 100644
--- a/src/gui/app1/jump.cs
+++ b/src/gui/app1/jump.cs
@@ -307,7 +307,7 @@ public partial class ChronoJumpWindow
private void updateGraphJumpsSimple ()
{
LogB.Information("Called updateGraphJumpsSimple");
- if(currentPerson == null || currentSession == null)
+ if(currentPerson == null || currentSession == null || currentJumpType == null)
//currentJumpType needed if there are no jumpTypes
return;
double tc = 0.0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]