add null check to new 4d memory method

This commit is contained in:
Steve Plimpton
2021-08-26 15:53:31 -06:00
parent e857911088
commit b6187b1989

View File

@ -524,8 +524,6 @@ class Memory : protected Pointers {
TYPE ****create4d_offset(TYPE ****&array, int n1, int n2lo, int n2hi, int n3lo, int n3hi,
int n4lo, int n4hi, const char *name)
{
if (n1 <= 0 || n2lo > n2hi || n3lo > n3hi || n4lo > n4hi) return nullptr;
int n2 = n2hi - n2lo + 1;
int n3 = n3hi - n3lo + 1;
int n4 = n4hi - n4lo + 1;