From dc483516b0161a29c1c349f594a80ddcc2a8f9ff Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 17 Mar 2007 05:04:16 +0000 Subject: added missing panic --- generic/tclListObj.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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++) { -- cgit v0.12