issue-107 fixing missing null check

This commit is contained in:
pschmidtke
2024-01-11 13:30:38 +01:00
parent 6463aee064
commit 57989435b4

View File

@@ -907,7 +907,7 @@ s_pdb *rpdb_open(char *fpath, const char *ligan, const int keep_lig, int model_n
{
pdb->n_xlig_atoms++;
}
else if (buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
else if (par->xlig_chain_code!=NULL && buf[21] == par->xlig_chain_code[0] && resnbuf == par->xlig_resnumber && par->xlig_resname[0] == resb[0] && par->xlig_resname[1] == resb[1] && par->xlig_resname[2] == resb[2])
{
pdb->n_xlig_atoms++;
}