mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
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:
parent
f2eacef33d
commit
8ceb2264c5
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue