avoid segfault, if repscale array is not allocated

This commit is contained in:
Axel Kohlmeyer
2022-11-30 08:08:32 -05:00
parent 9b7b45bdea
commit 80e6575784

View File

@ -297,7 +297,7 @@ void AngleSPICA::init_style()
repflag = 0;
for (int i = 1; i <= atom->nangletypes; i++)
if (repscale[i] > 0.0) repflag = 1;
if (repscale && (repscale[i] > 0.0)) repflag = 1;
// set up pointers to access SPICA LJ parameters for 1-3 interactions