Skip to content

Commit

Permalink
drake: Fix new code path for multi-inheritance on ownership transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
EricCousineau-TRI committed Mar 4, 2021
1 parent af6303e commit 5ea4bc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,12 @@ class class_ : public detail::generic_type {
// This should be called when the item is *actually* being deleted
// TODO(eric.cousineau): Do we care about use cases where the user manually calls this?
auto *inst = (detail::instance *) self.ptr();
const detail::type_info *lowest_type = detail::get_lowest_type(self);
const detail::type_info *lowest_type = detail::get_lowest_type(self, false);
if (!lowest_type) {
// This should only happen in a multi-inheritance case (which is
// not yet supported for this fork's ownership transfer setup).
return;
}
auto& release_info = lowest_type->release_info;
// The references are as follows:
// 1. When Python calls __del__ via tp_del (default slot)
Expand Down

0 comments on commit 5ea4bc8

Please sign in to comment.