mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Fix issue with Functor_converter when return type was not bool or void.
This commit is contained in:
@@ -697,7 +697,12 @@ struct Functor_converter<RET(PARAMS... )>
|
||||
|
||||
RET operator()(const PARAMS &...params) {
|
||||
GILock lock;
|
||||
return (RET) m_Callable(params...);
|
||||
if constexpr (std::is_same_v<RET, void>) {
|
||||
m_Callable(params...);
|
||||
}
|
||||
else {
|
||||
return bpy::extract<RET>(m_Callable(params...));
|
||||
}
|
||||
}
|
||||
|
||||
boost::python::object m_Callable;
|
||||
|
||||
Reference in New Issue
Block a user