Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2013-06-29 13:26:41 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2013-06-29 13:29:11 +0400
commit879bc0a9458c594eee909fd4c8a84df531ffecd3 (patch)
treef8e8d65d3da2d706a2fbaf18df78936d49c1acd2 /mcs/class/Mono.Cairo
parent18b8e63b6fa5ce34a2d8a8dd0bcefdc4b29dc8cd (diff)
[Mono.Cairo] Don't log warnings during VM shutdown
Else it can explode pretty badly if the Console streams are finalized before the Cairo objects.
Diffstat (limited to 'mcs/class/Mono.Cairo')
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs b/mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs
index 43b370f8b06..d694bbb5451 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/CairoDebug.cs
+++ b/mcs/class/Mono.Cairo/Mono.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) {