# | Line 22 | Line 22 | PairCorrType::PairCorrType( char* key1, char* key2, in | |
---|---|---|
22 | ||
23 | nAtoms = theNatoms; | |
24 | ||
25 | + | if( (nAtoms <= 0) || (nBins <= 0) ){ |
26 | + | sprintf( painCave.errMsg, |
27 | + | "Pair Corr Type Error: nBins and nAtoms must be greater than 0\n" |
28 | + | " nBins = %d, nAtoms = %d\n", |
29 | + | nBins, nAtoms ); |
30 | + | painCave.isFatal = 1; |
31 | + | simError(); |
32 | + | } |
33 | + | |
34 | + | |
35 | isAtom1 = new bool[nAtoms]; | |
36 | isAtom2 = new bool[nAtoms]; | |
37 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |