From 064e7fde2fe5a8e69cae12e9e53201e4e2eea289 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 16 Oct 2021 22:30:38 -0400 Subject: [PATCH] must not dereference null pointer --- src/GRANULAR/fix_pour.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 063efda351..bf32dcf86f 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -343,8 +343,8 @@ void FixPour::init() // if rigidflag defined, check for rigid/small fix // its molecule template must be same as this one - fixrigid = modify->get_fix_by_id(idrigid); if (rigidflag) { + fixrigid = modify->get_fix_by_id(idrigid); if (!fixrigid) error->all(FLERR,"Fix pour rigid fix does not exist"); int tmp; if (onemols != (Molecule **) fixrigid->extract("onemol",tmp)) @@ -354,8 +354,8 @@ void FixPour::init() // if shakeflag defined, check for SHAKE fix // its molecule template must be same as this one - fixshake = modify->get_fix_by_id(idshake); if (shakeflag) { + fixshake = modify->get_fix_by_id(idshake); if (!fixshake) error->all(FLERR,"Fix pour shake fix does not exist"); int tmp; if (onemols != (Molecule **) fixshake->extract("onemol",tmp))