diff options
author | dgp <dgp@users.sourceforge.net> | 2007-03-17 05:04:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-03-17 05:04:16 (GMT) |
commit | dc483516b0161a29c1c349f594a80ddcc2a8f9ff (patch) | |
tree | 060f78282129530603ae9790aa64a85a5006b500 /generic | |
parent | 18c87bb1b4d7087f3abe15c1b7847a81f5ce2093 (diff) | |
download | tcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.zip tcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.tar.gz tcl-dc483516b0161a29c1c349f594a80ddcc2a8f9ff.tar.bz2 |
added missing panic
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclListObj.c | 5 |
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++) { |