cairo: Don't log warnings during VM shutdown

Else it can explode pretty badly if the Console streams are
finalized before the Cairo objects.
This commit is contained in:
Michael Hutchinson 2013-06-29 05:26:41 -04:00 committed by Bertrand Lorentz
parent 0fd72adae0
commit c77fa9d048

View File

@ -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) {