[chronojump] Ensure pixel is not null on erase paint. fixes other problems on delete person at encoder.



commit 0a3ffd25143bb1c4e0b1e0d9705b424bde864b79
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Mar 4 13:54:08 2022 +0100

    Ensure pixel is not null on erase paint. fixes other problems on delete person at encoder.

 src/utilGtk.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 48b9c6350..2032e25bb 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -1014,7 +1014,9 @@ public class UtilGtk
        
        public static void ErasePaint(Gtk.DrawingArea da, Gdk.Pixmap px)
        {
-               px.DrawRectangle (da.Style.WhiteGC, true, 0, 0, da.Allocation.Width, da.Allocation.Height);
+               if(px != null)
+                       px.DrawRectangle (da.Style.WhiteGC, true, 0, 0, da.Allocation.Width, 
da.Allocation.Height);
+
                da.QueueDraw(); // -- refresh
        }
        


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