Skip to content

Commit

Permalink
fix #1 call addref in queryinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
apennamen committed Jan 22, 2021
1 parent bc6bb53 commit 9803f31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions derive-com-impl/src/derive.rs
Expand Up @@ -122,6 +122,8 @@ impl<'a> ComImpl<'a> {
return winapi::shared::winerror::E_POINTER;
}
if #( #is_equal_iid )||* {
let that = &*(this as *const Self);
that.#refcount.add_ref();
*ppv = this as *mut winapi::ctypes::c_void;
winapi::shared::winerror::S_OK
} else {
Expand Down

0 comments on commit 9803f31

Please sign in to comment.