Commit 3f916b19 authored by Ghislain MARY's avatar Ghislain MARY

Make a copy of listeners list before calling them in C++ wrapper so that the...

Make a copy of listeners list before calling them in C++ wrapper so that the list can be modified in these listeners.
parent fe79c8fd
......@@ -38,7 +38,7 @@ static {{{returnType}}} {{{cbName}}}({{{declArgs}}}) {
{{#ismultilistenable}}
{{{cListenerName}}} *cbs = {{{currentCallbacksGetter}}}({{{firstArgName}}});
std::list<std::shared_ptr<Listener> > &listeners = *(std::list<std::shared_ptr<Listener> > *){{{userDataGetter}}}(cbs);
std::list<std::shared_ptr<Listener> > listeners = *(std::list<std::shared_ptr<Listener> > *){{{userDataGetter}}}(cbs);
for(auto it=listeners.begin(); it!=listeners.end(); it++) {
std::shared_ptr<{{{cppListenerName}}}> listener = std::static_pointer_cast<{{{cppListenerName}}},Listener>(*it);
{{{cppMethodCallingLine}}};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment