From d3976c2afe608d70724e2d3d59093b6fbb3d230a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 8 May 2009 10:30:36 +0200 Subject: Fix crash in python plugin after parse file error --- src/plugins/scripts/python/weechat-python.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 46cfbbc80..2e8056425 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -472,8 +472,6 @@ weechat_python_load (const char *filename) if (PyErr_Occurred ()) PyErr_Print (); - Py_EndInterpreter (python_current_interpreter); - /* PyEval_ReleaseLock (); */ /* if script was registered, removing from list */ if (python_current_script != NULL) @@ -482,6 +480,10 @@ weechat_python_load (const char *filename) &python_scripts, &last_python_script, python_current_script); } + + Py_EndInterpreter (python_current_interpreter); + /* PyEval_ReleaseLock (); */ + return 0; } -- cgit v1.2.3