[chronojump] Fixed an eventual crash on g.LineWidth at encoderSignal graph when there's no graph
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed an eventual crash on g.LineWidth at encoderSignal graph when there's no graph
- Date: Thu, 31 Mar 2022 07:42:09 +0000 (UTC)
commit 3b6256bc03ebeeb071801417e7118706a331ac41
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 31 09:40:19 2022 +0200
Fixed an eventual crash on g.LineWidth at encoderSignal graph when there's no graph
src/gui/cairo/encoder.cs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/gui/cairo/encoder.cs b/src/gui/cairo/encoder.cs
index a804b1ecd..e5e027042 100644
--- a/src/gui/cairo/encoder.cs
+++ b/src/gui/cairo/encoder.cs
@@ -99,6 +99,10 @@ public class CairoGraphEncoderSignal : CairoXY
(isInertial && (points_list_inertial == null || points_list_inertial.Count ==
0)) )
return true;
+ //fix an eventual crash on g.LineWidth below
+ if(g == null)
+ return false;
+
g.LineWidth = 1;
pointsRadius = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]