--- trunk/OOPSE/staticProps/PairCorrType.cpp 2003/12/12 15:42:13 878 +++ trunk/OOPSE/staticProps/PairCorrType.cpp 2003/12/16 20:49:11 879 @@ -22,6 +22,16 @@ PairCorrType::PairCorrType( char* key1, char* key2, in nAtoms = theNatoms; + if( (nAtoms <= 0) || (nBins <= 0) ){ + sprintf( painCave.errMsg, + "Pair Corr Type Error: nBins and nAtoms must be greater than 0\n" + " nBins = %d, nAtoms = %d\n", + nBins, nAtoms ); + painCave.isFatal = 1; + simError(); + } + + isAtom1 = new bool[nAtoms]; isAtom2 = new bool[nAtoms];