From c77fa9d048fe7b09ec028e8e6872d4e48c017b1d Mon Sep 17 00:00:00 2001 From: Michael Hutchinson Date: Sat, 29 Jun 2013 05:26:41 -0400 Subject: [PATCH] cairo: Don't log warnings during VM shutdown Else it can explode pretty badly if the Console streams are finalized before the Cairo objects. --- cairo/CairoDebug.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cairo/CairoDebug.cs b/cairo/CairoDebug.cs index 43b370f8b..d694bbb54 100644 --- a/cairo/CairoDebug.cs +++ b/cairo/CairoDebug.cs @@ -58,6 +58,9 @@ namespace Cairo { if (disposing && !Enabled) throw new InvalidOperationException (); + if (Environment.HasShutdownStarted) + return; + if (!disposing) { Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName); if (Enabled) {