shdocvw: Make sure BSTR is allocated before calling sink

Cihan Altinay bobbyg at gmx.net
Fri Sep 29 12:47:53 CDT 2006


This fixes bug 6054 and let's 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 5bb40e0..8d78a49 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(This->url);
      if(disp)
          IDispatch_Release(disp);
  }
-- 
1.4.2.1



More information about the wine-patches mailing list