From 5eaed0dbf78fca2bcf185da0abf1dbf41722deb2 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Fri, 14 Jul 2006 10:02:13 +0000 Subject: finished up themes. time for textui stuff git-svn-id: http://svn.irssi.org/repos/irssi-python@4297 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- pyloader.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pyloader.c') diff --git a/pyloader.c b/pyloader.c index 03b5150..a087827 100644 --- a/pyloader.c +++ b/pyloader.c @@ -148,7 +148,14 @@ error: else printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "error loading script %s", argv[0]); - Py_XDECREF(script); + if (script) + { + /* make sure to clean up any formats, signals, commands that may have been + attached before the exception took place */ + pyscript_cleanup(script); + Py_DECREF(script); + } + g_free(path); return 0; -- cgit