File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -95,23 +95,30 @@ void NotepadPlusWrapper::notify(SCNotification *notifyCode)
9595 break ;
9696 }
9797
98+
99+ std::list<PyObject*> callbacks;
100+
98101 while (callbackIter.first != callbackIter.second )
99102 {
100-
103+ callbacks.push_back (callbackIter.first ->second );
104+ ++callbackIter.first ;
105+ }
106+
107+
108+ for (std::list<PyObject*>::iterator listIter = callbacks.begin (); listIter != callbacks.end (); ++listIter)
109+ {
101110 PyGILState_STATE state = PyGILState_Ensure ();
102111 try
103112 {
104113 s_inEvent = true ;
105- call<PyObject*>(callbackIter. first -> second , params);
114+ call<PyObject*>((*listIter) , params);
106115 s_inEvent = false ;
107116 }
108117 catch (...)
109118 {
110119 PyErr_Print ();
111120 }
112121 PyGILState_Release (state);
113-
114- ++callbackIter.first ;
115122 }
116123
117124 }
You can’t perform that action at this time.
0 commit comments