* interp.c: In interp_walk_stack, don't crash if the context is not set
authorLluis Sanchez <lluis@novell.com>
Thu, 9 Sep 2004 09:53:39 +0000 (09:53 -0000)
committerLluis Sanchez <lluis@novell.com>
Thu, 9 Sep 2004 09:53:39 +0000 (09:53 -0000)
  (this may happen if the method is called by unmanaged code).

svn path=/trunk/mono/; revision=33632

mono/interpreter/ChangeLog
mono/interpreter/interp.c

index 3d346099c1aee281c3eccff1c7757d6020a14b87..98fe5a5b71ea7a967865b816a0575ad78c1ce7ad 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-09  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * interp.c: In interp_walk_stack, don't crash if the context is not set
+         (this may happen if the method is called by unmanaged code).
+
 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
 
        * interp.c: thread local alloc
index 09cae7e0573f6a6cd0238746da8a462351e39eb5..8f20e2d080422f62b2971515641fef6422dc03a7 100644 (file)
@@ -672,6 +672,8 @@ static void
 interp_walk_stack (MonoStackWalk func, gpointer user_data)
 {
        ThreadContext *context = TlsGetValue (thread_context_id);
+       if (!context) return;
+               
        MonoInvocation *frame = context->current_frame;
        int il_offset;
        MonoMethodHeader *hd;