summaryrefslogtreecommitdiffstats
path: root/generic/tclTimer.c
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2005-10-04 18:14:14 (GMT)
committervasiljevic <zv@archiware.com>2005-10-04 18:14:14 (GMT)
commitcee7aab42e96de098d7fab4437ef46fd153d8b70 (patch)
tree59382bb22519600cf3b18c63f872c86a58d8e146 /generic/tclTimer.c
parentaba1eff34b67c5292b0d38c4ebdf88247b85f5e8 (diff)
downloadtcl-cee7aab42e96de098d7fab4437ef46fd153d8b70.zip
tcl-cee7aab42e96de098d7fab4437ef46fd153d8b70.tar.gz
tcl-cee7aab42e96de098d7fab4437ef46fd153d8b70.tar.bz2
Tcl_ClearChannelHandlers(): bail out early if passed NULL argument
Diffstat (limited to 'generic/tclTimer.c')
-rw-r--r--generic/tclTimer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 0e14f4d..5832382 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTimer.c,v 1.6.2.2 2005/03/23 21:58:17 dgp Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.6.2.3 2005/10/04 18:14:14 vasiljevic Exp $
*/
#include "tclInt.h"
@@ -303,9 +303,12 @@ Tcl_DeleteTimerHandler(token)
* Tcl_DeleteTimerHandler. */
{
register TimerHandler *timerHandlerPtr, *prevPtr;
- ThreadSpecificData *tsdPtr;
+ ThreadSpecificData *tsdPtr = InitTimer();
+
+ if (token == NULL) {
+ return;
+ }
- tsdPtr = InitTimer();
for (timerHandlerPtr = tsdPtr->firstTimerHandlerPtr, prevPtr = NULL;
timerHandlerPtr != NULL; prevPtr = timerHandlerPtr,
timerHandlerPtr = timerHandlerPtr->nextPtr) {