From: Patrick Rudolph <[email protected]> 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 <[email protected]> Reviewed-by: Axel Davy <[email protected]> --- src/gallium/state_trackers/nine/iunknown.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/iunknown.c b/src/gallium/state_trackers/nine/iunknown.c index 6d501d8..89b82ea 100644 --- a/src/gallium/state_trackers/nine/iunknown.c +++ b/src/gallium/state_trackers/nine/iunknown.c @@ -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; } -- 2.10.0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
