Merge pull request #1668 from alexanderkyte/bug1856
[mono.git] / mono / mini / exceptions-x86.c
index 03e7aec44a0bf721b0fd95799e49b524ff110a40..d7d4f72d299091b426195e49712a4002b98c0eda 100644 (file)
@@ -472,8 +472,10 @@ mono_x86_throw_exception (mgreg_t *regs, MonoObject *exc,
 
        if (mono_object_isinst (exc, mono_defaults.exception_class)) {
                MonoException *mono_ex = (MonoException*)exc;
-               if (!rethrow)
+               if (!rethrow) {
                        mono_ex->stack_trace = NULL;
+                       mono_ex->trace_ips = NULL;
+               }
        }
 
        /* adjust eip so that it point into the call instruction */
@@ -718,7 +720,7 @@ mono_arch_exceptions_init (void)
  * for SEHs to behave. This requires hotfix http://support.microsoft.com/kb/976038
  * or (eventually) Windows 7 SP1.
  */
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
        DWORD flags;
        FARPROC getter;
        FARPROC setter;