Skip to content

Commit e0fb875

Browse files
committed
Merge branch 'fix-form-input-builder' of github.com:rbran/binaryninja-api into dev
2 parents 3ccfede + 3e444f2 commit e0fb875

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/src/interaction.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ impl FormInputBuilder {
296296
result.type_ = BNFormInputFieldType::AddressFormField;
297297
result.prompt = prompt.as_ref().as_ptr() as *const c_char;
298298
if let Some(view) = view {
299-
result.view = view.handle;
299+
// the view is being moved into result, there is no need to clone
300+
// and drop is intentionally being avoided with `Ref::into_raw`
301+
result.view = unsafe { Ref::into_raw(view) }.handle;
300302
}
301303
result.currentAddress = current_address.unwrap_or(0);
302304
result.hasDefault = default.is_some();

0 commit comments

Comments
 (0)