summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-13 21:10:43 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-13 21:10:43 (GMT)
commit609f145e4b123cb02812aa5f66ffc4992f4fb47c (patch)
tree755c23b39dd456b534322dcdeed11d3831c9076a
parent8ff3dfaf5a77d7ef96490cc9dc418979e505903f (diff)
downloadtcl-609f145e4b123cb02812aa5f66ffc4992f4fb47c.zip
tcl-609f145e4b123cb02812aa5f66ffc4992f4fb47c.tar.gz
tcl-609f145e4b123cb02812aa5f66ffc4992f4fb47c.tar.bz2
Handle error case [info class destructor].
-rw-r--r--ChangeLog2
-rw-r--r--generic/tclOOInfo.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d021174..5ba5dcd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2008-10-13 Donal K. Fellows <dkf@users.sf.net>
+ * generic/tclOOInfo.c (InfoClassDestrCmd): Handle error case.
+
* generic/tclOOInt.h: Added macro magic to make things work with
Objective C. [Bug 2163447]
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index ee19373..d994e94 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.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: tclOOInfo.c,v 1.8 2008/10/04 12:00:25 dkf Exp $
+ * RCS: @(#) $Id: tclOOInfo.c,v 1.9 2008/10/13 21:10:43 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -886,6 +886,10 @@ InfoClassDestrCmd(
return TCL_ERROR;
}
clsPtr = GetClassFromObj(interp, objv[1]);
+ if (clsPtr == NULL) {
+ return TCL_ERROR;
+ }
+
if (clsPtr->destructorPtr == NULL) {
return TCL_OK;
}