Hi, It doesn't resove the issue completely, but the following commit may reduce crash frequency.
Fix an NRE I randomly hit. https://github.com/PintaProject/Pinta/commit/1e6197674c1dc653a76f231eb1ace7cf69cdf984 --- a/Pinta.Core/Classes/DocumentWorkspace.cs +++ b/Pinta.Core/Classes/DocumentWorkspace.cs @@ -270,7 +270,8 @@ zoom = Math.Min (zoom, 3600); - PintaCore.Chrome.Canvas.GdkWindow.FreezeUpdates (); + if (PintaCore.Chrome.Canvas.GdkWindow != null) + PintaCore.Chrome.Canvas.GdkWindow.FreezeUpdates (); PintaCore.Actions.View.SuspendZoomUpdate (); Gtk.Viewport view = (Gtk.Viewport)PintaCore.Chrome.Canvas.Parent; @@ -336,7 +337,8 @@ RecenterView (center_x, center_y); PintaCore.Actions.View.ResumeZoomUpdate (); - PintaCore.Chrome.Canvas.GdkWindow.ThawUpdates (); + if (PintaCore.Chrome.Canvas.GdkWindow != null) + PintaCore.Chrome.Canvas.GdkWindow.ThawUpdates (); } #endregion }
--- a/Pinta.Core/Classes/DocumentWorkspace.cs +++ b/Pinta.Core/Classes/DocumentWorkspace.cs @@ -270,7 +270,8 @@ zoom = Math.Min (zoom, 3600); - PintaCore.Chrome.Canvas.GdkWindow.FreezeUpdates (); + if (PintaCore.Chrome.Canvas.GdkWindow != null) + PintaCore.Chrome.Canvas.GdkWindow.FreezeUpdates (); PintaCore.Actions.View.SuspendZoomUpdate (); Gtk.Viewport view = (Gtk.Viewport)PintaCore.Chrome.Canvas.Parent; @@ -336,7 +337,8 @@ RecenterView (center_x, center_y); PintaCore.Actions.View.ResumeZoomUpdate (); - PintaCore.Chrome.Canvas.GdkWindow.ThawUpdates (); + if (PintaCore.Chrome.Canvas.GdkWindow != null) + PintaCore.Chrome.Canvas.GdkWindow.ThawUpdates (); } #endregion }