Commit 51241fb1 authored by Hyun Soo  Kim's avatar Hyun Soo Kim
Browse files

fix adding null molecule to database; do not add null molecule to database

parent e1e02e76
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ public class MoleculeDatabase {
     * Add a new molecule into the database
     */
    public void addMolecule(Molecule molecule) {
        if (molecule == null) {
            return;
        }
        int numAtoms = molecule.getNumAtoms();
        if (this.db.containsKey(numAtoms)) {
            this.db.get(numAtoms).add(molecule);