summaryrefslogtreecommitdiffstats
path: root/generic/tclTimer.c
diff options
context:
space:
mode:
authorvasiljevic <vasiljevic@noemail.net>2005-10-04 18:33:30 (GMT)
committervasiljevic <vasiljevic@noemail.net>2005-10-04 18:33:30 (GMT)
commita178a6825dece103eda3faf8a1b35f5ba632cfe1 (patch)
tree05410b6db8bbaed600af3b09065762e4d056baba /generic/tclTimer.c
parent1942f55eae34e67cf86520190eeb641c39af6248 (diff)
downloadtcl-a178a6825dece103eda3faf8a1b35f5ba632cfe1.zip
tcl-a178a6825dece103eda3faf8a1b35f5ba632cfe1.tar.gz
tcl-a178a6825dece103eda3faf8a1b35f5ba632cfe1.tar.bz2
Tcl_DeleteTimerHandler(): bail out early if passed NULL argument.
FossilOrigin-Name: 5576a42ab15f772953281968ab3dbfc15353176c
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 e441867..faf44b7 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.18 2005/09/15 16:40:02 dgp Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.19 2005/10/04 18:33:30 vasiljevic Exp $
*/
#include "tclInt.h"
@@ -345,9 +345,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) {