summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-12-17 21:35:55 (GMT)
committerhobbs <hobbs>2002-12-17 21:35:55 (GMT)
commitffa5cc26e85ed18e635f1a686ac0f4bbf7a63f4e (patch)
treef52efdc91a35a428ac0b5ca6d9bd65d98f6827e6 /generic
parent8fd397ee9ff91c143248a1ad2d38a15501f42489 (diff)
downloadtcl-ffa5cc26e85ed18e635f1a686ac0f4bbf7a63f4e.zip
tcl-ffa5cc26e85ed18e635f1a686ac0f4bbf7a63f4e.tar.gz
tcl-ffa5cc26e85ed18e635f1a686ac0f4bbf7a63f4e.tar.bz2
* generic/tclNotify.c (TclFinalizeNotifier, Tcl_SetServiceMode):
(Tcl_ThreadAlert): Check that the stub functions are non-NULL before calling them. They could be set to NULL by Tcl_SetNotifier.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclNotify.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index a8754b0..a9bdebc 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNotify.c,v 1.9 2002/08/31 06:09:45 das Exp $
+ * RCS: @(#) $Id: tclNotify.c,v 1.10 2002/12/17 21:35:56 hobbs Exp $
*/
#include "tclInt.h"
@@ -160,7 +160,9 @@ TclFinalizeNotifier()
Tcl_MutexLock(&listLock);
- tclStubs.tcl_FinalizeNotifier(tsdPtr->clientData);
+ if (tclStubs.tcl_FinalizeNotifier) {
+ tclStubs.tcl_FinalizeNotifier(tsdPtr->clientData);
+ }
Tcl_MutexFinalize(&(tsdPtr->queueMutex));
for (prevPtrPtr = &firstNotifierPtr; *prevPtrPtr != NULL;
prevPtrPtr = &((*prevPtrPtr)->nextPtr)) {
@@ -721,7 +723,9 @@ Tcl_SetServiceMode(mode)
oldMode = tsdPtr->serviceMode;
tsdPtr->serviceMode = mode;
- tclStubs.tcl_ServiceModeHook(mode);
+ if (tclStubs.tcl_ServiceModeHook) {
+ tclStubs.tcl_ServiceModeHook(mode);
+ }
return oldMode;
}
@@ -1087,7 +1091,9 @@ Tcl_ThreadAlert(threadId)
Tcl_MutexLock(&listLock);
for (tsdPtr = firstNotifierPtr; tsdPtr; tsdPtr = tsdPtr->nextPtr) {
if (tsdPtr->threadId == threadId) {
- tclStubs.tcl_AlertNotifier(tsdPtr->clientData);
+ if (tclStubs.tcl_AlertNotifier) {
+ tclStubs.tcl_AlertNotifier(tsdPtr->clientData);
+ }
break;
}
}