[chronojump] Fixed crash on start if started with encoder and then load session with pulse data



commit 16d11339f0ee975af9c7e4642e1cba6a02cf9438
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Aug 21 13:01:49 2016 +0200

    Fixed crash on start if started with encoder and then load session with pulse data

 src/gui/eventExecute.cs |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 1353255..d58d8c4 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -1123,6 +1123,10 @@ public partial class ChronoJumpWindow
                int ancho=drawingarea.Allocation.Width;
                int alto=drawingarea.Allocation.Height;
                
+               //fix problem on show graph at Chronojump start
+               if(event_execute_drawingarea == null || event_execute_pixmap == null)
+                       return;
+
                UtilGtk.ErasePaint(event_execute_drawingarea, event_execute_pixmap);
                //writeMarginsText(maxValue, minValue, alto);
                
@@ -1191,6 +1195,10 @@ public partial class ChronoJumpWindow
                int ancho=drawingarea.Allocation.Width;
                int alto=drawingarea.Allocation.Height;
                
+               //fix problem on show graph at Chronojump start
+               if(event_execute_drawingarea == null || event_execute_pixmap == null)
+                       return;
+
                UtilGtk.ErasePaint(event_execute_drawingarea, event_execute_pixmap);
                //writeMarginsText(maxValue, minValue, alto);
                
@@ -1609,6 +1617,9 @@ public partial class ChronoJumpWindow
                int ancho=drawingarea.Allocation.Width;
                int alto=drawingarea.Allocation.Height;
                
+               //fix problem on show graph at Chronojump start
+               if(event_execute_drawingarea == null || event_execute_pixmap == null)
+                       return;
                
                UtilGtk.ErasePaint(event_execute_drawingarea, event_execute_pixmap);
                


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