2008-06-10 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Tue, 10 Jun 2008 13:26:02 +0000 (13:26 -0000)
committerMartin Baulig <martin@novell.com>
Tue, 10 Jun 2008 13:26:02 +0000 (13:26 -0000)
* MonoSymbolWriter.cs
(MonoSymbolWriter.CloseMethod): Quick-fix; still a lot of broken
code out there.

svn path=/trunk/mcs/; revision=105419

mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog
mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs

index 28d70950be57535ec58a9cde5e50d4ce435c6a0a..a79b7fc73eba0872c4eaa7d0452c49a396b56595 100644 (file)
@@ -1,3 +1,9 @@
+2008-06-10  Martin Baulig  <martin@ximian.com>
+
+       * MonoSymbolWriter.cs
+       (MonoSymbolWriter.CloseMethod): Quick-fix; still a lot of broken
+       code out there.
+
 2008-06-05  Martin Baulig  <martin@ximian.com>
 
        * MonoSymbolTable.cs
index 96ab9b987f8795a66e5fbe119ee406929d5ab07a..9f234dcc7f85c292e2c288de25f5815d798f2695 100644 (file)
@@ -187,6 +187,12 @@ namespace Mono.CompilerServices.SymbolWriter
 
                public void CloseMethod ()
                {
+                       if (current_method == null) {
+                               Console.WriteLine ("Some clown is calling CloseMethod() while " +
+                                                  "current_method == null: {0}", Environment.StackTrace);
+                               return;
+                       }
+                                               
                        current_method.SetLineNumbers (
                                current_method_lines, current_method_lines_pos);
                        current_method_lines_pos = 0;