fix possible crash

This commit is contained in:
TingPing 2013-05-04 00:00:48 -03:00
parent c4e96dd481
commit efd21ce982
1 changed files with 1 additions and 0 deletions

View File

@ -1247,6 +1247,7 @@ error:
if (plugin) { if (plugin) {
if (plugin->tstate) if (plugin->tstate)
{ {
Plugin_RemoveAllHooks((PyObject *)plugin);
/* FIXME: Handle this? */ /* FIXME: Handle this? */
if (plugin->tstate == PyInterpreterState_ThreadHead(plugin->tstate->interp)) if (plugin->tstate == PyInterpreterState_ThreadHead(plugin->tstate->interp))
Py_EndInterpreter(plugin->tstate); Py_EndInterpreter(plugin->tstate);