Skip to content

Commit 0f39a06

Browse files
committed
Experiment: apply 41c37a3 also in smart_holder_from_unique_ptr()
1 parent 44272c9 commit 0f39a06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/pybind11/detail/type_caster_base.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ handle smart_holder_from_unique_ptr(std::unique_ptr<T, D> &&src,
588588
auto *inst_raw_ptr = reinterpret_cast<instance *>(inst.ptr());
589589
inst_raw_ptr->owned = true;
590590
void *&valueptr = values_and_holders(inst_raw_ptr).begin()->value_ptr();
591-
valueptr = src_raw_void_ptr;
591+
if (valueptr) {
592+
}
592593

593594
if (static_cast<void *>(src.get()) == src_raw_void_ptr) {
594595
// This is a multiple-inheritance situation that is incompatible with the current

0 commit comments

Comments
 (0)