mirror of https://github.com/KLayout/klayout.git
Avoid a segfault when the owner of a callable went out of scope and got deleted (pya): null weak pointer happens
This commit is contained in:
parent
3f1c3cf209
commit
fc75bf72f8
|
|
@ -138,7 +138,10 @@ void SignalHandler::call (const gsi::MethodBase *meth, gsi::SerialArgs &args, gs
|
|||
std::vector<PythonRef> callables;
|
||||
callables.reserve (m_cbfuncs.size ());
|
||||
for (std::vector<CallbackFunction>::const_iterator c = m_cbfuncs.begin (); c != m_cbfuncs.end (); ++c) {
|
||||
callables.push_back (c->callable ());
|
||||
PythonRef callable = c->callable ();
|
||||
if (callable) {
|
||||
callables.push_back (c->callable ());
|
||||
}
|
||||
}
|
||||
|
||||
PythonRef result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue