Fix logic in init_ewald_coulomb_force_table
authorAndrey Alekseenko <al42and@gmail.com>
Mon, 5 Oct 2020 10:03:45 +0000 (12:03 +0200)
committerArtem Zhmurov <zhmurov@gmail.com>
Tue, 6 Oct 2020 10:01:53 +0000 (10:01 +0000)
commit3d812ce90a659464a99186901eb08f064b7cd21f
tree732e5301ef15fdeeb2263957735da81ec6b7d932
parent37969a6d5a36f14a213df01acf7411f743988c1d
Fix logic in init_ewald_coulomb_force_table

Previously, destroyParamLookupTable was called only if buffer was
nullptr (uninitialized). Which looks like a typo, and leads to nothing,
because all implementation of destroyParamLookupTable would refuse to
work on nullptr. Changed the check to free the buffer only if there is
anything to free.
src/gromacs/nbnxm/nbnxm_gpu_data_mgmt.cpp