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:
parent
0fd72adae0
commit
c77fa9d048
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ namespace Cairo {
|
||||||
if (disposing && !Enabled)
|
if (disposing && !Enabled)
|
||||||
throw new InvalidOperationException ();
|
throw new InvalidOperationException ();
|
||||||
|
|
||||||
|
if (Environment.HasShutdownStarted)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!disposing) {
|
if (!disposing) {
|
||||||
Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName);
|
Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName);
|
||||||
if (Enabled) {
|
if (Enabled) {
|
||||||
|
|
Loading…
Reference in a new issue