[chronojump] Fixed possible crash on a null pixmap on loading set



commit 8cf8b367a9c9d392a4ca6997d9ddbc0270fb360a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 9 16:37:43 2016 +0200

    Fixed possible crash on a null pixmap on loading set

 src/gui/encoder.cs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 6336eda..5295944 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -4556,8 +4556,10 @@ public partial class ChronoJumpWindow
                LogB.Debug("prepareEncoderGraphs() start (should be on first thread: GTK)");
                
                if(eraseFirst) {
-                       UtilGtk.ErasePaint(encoder_capture_signal_drawingarea, encoder_capture_signal_pixmap);
-                       UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea, 
encoder_capture_curves_bars_pixmap);
+                       if(encoder_capture_signal_pixmap != null)
+                               UtilGtk.ErasePaint(encoder_capture_signal_drawingarea, 
encoder_capture_signal_pixmap);
+                       if(encoder_capture_curves_bars_pixmap != null)
+                               UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea, 
encoder_capture_curves_bars_pixmap);
                }
 
                layout_encoder_capture_signal = new Pango.Layout 
(encoder_capture_signal_drawingarea.PangoContext);


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