Forgot to call AddRef() in QueryInterface(). Thanks to Jonathan Potter.
This commit is contained in:
parent
7487dbb27c
commit
7453385923
|
@ -7,6 +7,8 @@ struct tableAcc {
|
|||
// TODO create a standard accessible object
|
||||
};
|
||||
|
||||
#define TA ((struct tableAcc *) this)
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (ppvObject == NULL)
|
||||
|
@ -14,6 +16,7 @@ static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFII
|
|||
if (IsEqualIID(riid, &IID_IUnknown) ||
|
||||
IsEqualIID(riid, &IID_IDispatch) ||
|
||||
IsEqualIID(riid, &IID_IAccessible)) {
|
||||
TA->vtbl->AddRef(TA);
|
||||
*ppvObject = (void *) this;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -21,8 +24,6 @@ static HRESULT STDMETHODCALLTYPE tableAccQueryInterface(IAccessible *this, REFII
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
#define TA ((struct tableAcc *) this)
|
||||
|
||||
// TODO use InterlockedIncrement()/InterlockedDecrement() for these?
|
||||
|
||||
static ULONG STDMETHODCALLTYPE tableAccAddRef(IAccessible *this)
|
||||
|
|
Loading…
Reference in New Issue