avoid dereferencing reaxff object when no reaxff pair style in use

This commit is contained in:
Axel Kohlmeyer
2024-11-15 13:01:23 -05:00
parent 9a096f295f
commit cf5c42889d
2 changed files with 2 additions and 2 deletions

View File

@ -344,7 +344,7 @@ void FixQEqReaxFF::allocate_matrix()
int mincap; int mincap;
double safezone; double safezone;
if (reaxflag) { if (reaxflag && reaxff) {
mincap = reaxff->api->system->mincap; mincap = reaxff->api->system->mincap;
safezone = reaxff->api->system->safezone; safezone = reaxff->api->system->safezone;
} else { } else {

View File

@ -370,7 +370,7 @@ void FixQtpieReaxFF::allocate_matrix()
int mincap; int mincap;
double safezone; double safezone;
if (reaxflag) { if (reaxflag && reaxff) {
mincap = reaxff->api->system->mincap; mincap = reaxff->api->system->mincap;
safezone = reaxff->api->system->safezone; safezone = reaxff->api->system->safezone;
} else { } else {