Hi Huw, 2014-06-25 19:18 GMT+08:00 Huw Davies <huw@codeweavers.com>: > > > diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
> > index 2af2582..65e70fa 100644 > > --- a/dlls/riched20/editor.c > > +++ b/dlls/riched20/editor.c > > @@ -4468,6 +4468,13 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
> > case EM_GETOLEINTERFACE: > > { > > LPVOID *ppvObj = (LPVOID*) lParam; > > + if (editor->reOle) > > + { > > + *ppvObj = editor->reOle;
> > + IRichEditOle_AddRef(*ppvObj); > > + return 1; > > + } > > + > > return CreateIRichEditOle(editor, ppvObj); > > } > > case EM_GETPASSWORDCHAR:
> > > Better to assign editor->reOle here too. > That will be one ref, then every returned iface should add > another ref. So the first iface returned will have > refcount of 2 and then your tests will pass.
> > You release the final ref in the editor destructor.