From c97370c7e0a376ffe53f3fce7dfe12f90f18630f Mon Sep 17 00:00:00 2001 From: silverleo Date: Sat, 19 Dec 2009 21:43:33 +0000 Subject: [PATCH] Always null the interp var on load to prevent a possible crash on unload. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1685 726aef4b-f618-498e-8847-2d620e286838 --- modules/extra/modtcl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/extra/modtcl.cpp b/modules/extra/modtcl.cpp index 8db300f2..f71014b9 100644 --- a/modules/extra/modtcl.cpp +++ b/modules/extra/modtcl.cpp @@ -50,7 +50,9 @@ protected: class CModTcl : public CModule { public: - MODCONSTRUCTOR(CModTcl) {} + MODCONSTRUCTOR(CModTcl) { + interp = NULL; + } virtual ~CModTcl() { if (interp) { @@ -66,7 +68,6 @@ public: } #endif - interp = NULL; AddTimer(new CModTclStartTimer(this, 1, 1, "ModTclStarter", "Timer for modtcl to load the interpreter.")); return true; }