Resend: shdocvw: Make sure BSTR is allocated before calling sink

Cihan Altinay bobbyg at gmx.net
Tue Oct 17 10:24:47 CDT 2006


Sorry about the noise. Replaced the tab now.

This fixes bug 6054 and lets MSN Messenger 7 start up.
http://bugs.winehq.org/show_bug.cgi?id=6054

---
  dlls/shdocvw/dochost.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/shdocvw/dochost.c b/dlls/shdocvw/dochost.c
index 0f6ef4e..834788f 100644
--- a/dlls/shdocvw/dochost.c
+++ b/dlls/shdocvw/dochost.c
@@ -49,11 +49,12 @@ static void navigate_complete(DocHost *T
      V_DISPATCH(params+1) = disp;

      V_VT(&url) = VT_BSTR;
-    V_BSTR(&url) = This->url;
+    V_BSTR(&url) = SysAllocString(This->url);

      call_sink(This->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams);
      call_sink(This->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams);

+    SysFreeString(V_BSTR(&url));
      if(disp)
          IDispatch_Release(disp);
  }
-- 
1.4.2.3




More information about the wine-patches mailing list