st/nine: Fix assert in NineUnknown_QueryInterface
Tests showed that is allowed to call this method on object that have a zero refcount. Required for issue #230. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
committed by
Axel Davy
parent
f2eacef33d
commit
8ceb2264c5
@@ -70,7 +70,10 @@ NineUnknown_QueryInterface( struct NineUnknown *This,
|
||||
do {
|
||||
if (GUID_equal(This->guids[i], riid)) {
|
||||
*ppvObject = This;
|
||||
assert(This->refs);
|
||||
/* Tests showed that this call succeeds even on objects with
|
||||
* zero refcount. This can happen if the app released all references
|
||||
* but the resource is still bound.
|
||||
*/
|
||||
NineUnknown_AddRef(This);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user