summaryrefslogtreecommitdiffstats
path: root/generic/tclOODefineCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-05-04 17:39:50 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-05-04 17:39:50 (GMT)
commitfd6cead82a2f2f559fa5376d1e8cf520ef79da95 (patch)
treee22acd444243f8927257e1586141c941c8d25c0c /generic/tclOODefineCmds.c
parentba58e6442af44bef063652e496e60f09826716ec (diff)
downloadtcl-fd6cead82a2f2f559fa5376d1e8cf520ef79da95.zip
tcl-fd6cead82a2f2f559fa5376d1e8cf520ef79da95.tar.gz
tcl-fd6cead82a2f2f559fa5376d1e8cf520ef79da95.tar.bz2
Stop deletion of support namespaces leading to a potential crash.
Diffstat (limited to 'generic/tclOODefineCmds.c')
-rw-r--r--generic/tclOODefineCmds.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index b732eec..2fb9ce5 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.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: tclOODefineCmds.c,v 1.10 2009/02/12 09:27:43 dkf Exp $
+ * RCS: @(#) $Id: tclOODefineCmds.c,v 1.11 2009/05/04 17:39:51 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -564,6 +564,13 @@ InitDefineContext(
CallFrame *framePtr, **framePtrPtr = &framePtr;
int result;
+ if (namespacePtr == NULL) {
+ Tcl_AppendResult(interp,
+ "cannot process definitions; support namespace deleted",
+ NULL);
+ return TCL_ERROR;
+ }
+
/* framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules */
result = TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr,