summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-17 05:04:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-17 05:04:16 (GMT)
commitdc483516b0161a29c1c349f594a80ddcc2a8f9ff (patch)
tree060f78282129530603ae9790aa64a85a5006b500 /generic/tclListObj.c
parent18c87bb1b4d7087f3abe15c1b7847a81f5ce2093 (diff)
downloadtcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.zip
tcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.tar.gz
tcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.tar.bz2
added missing panic
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 836c866..f619f8b 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclListObj.c,v 1.41 2007/03/12 10:22:45 dkf Exp $
+ * RCS: @(#) $Id: tclListObj.c,v 1.42 2007/03/17 05:04:16 dgp Exp $
*/
#include "tclInt.h"
@@ -1530,6 +1530,9 @@ TclListObjSetElement(
int i;
listRepPtr = NewListIntRep(listRepPtr->maxElemCount, NULL);
+ if (listRepPtr == NULL) {
+ Tcl_Panic("Not enough memory to allocate list");
+ }
listRepPtr->canonicalFlag = oldListRepPtr->canonicalFlag;
elemPtrs = &listRepPtr->elements;
for (i=0; i < elemCount; i++) {