Fix energy history reading
commitd5972f77fdf7fed7735729a25594b652c874804d
authorPaul Bauer <paul.bauer.q@gmail.com>
Thu, 29 Nov 2018 13:42:49 +0000 (29 14:42 +0100)
committerPaul Bauer <paul.bauer.q@gmail.com>
Thu, 29 Nov 2018 14:30:42 +0000 (29 15:30 +0100)
treed5d542e10fc4247028d71c05a5fde92926886306
parente9f6acc2e39cbf8c87bdabcef643822130c7a320
Fix energy history reading

The energy history could be read as a nullptr from a checkpoint file,
leading to issues when trying to restart a simulation. Fixed the logic
issue and added an assertion to catch it in the future.

Also removed redundant comparisons to nullptr.

Separate commit on 2018 as per #2770.

Refs #2781

Change-Id: Ic584dc92c110065c1650cc1ab0d7ff0a8960fb3a
src/gromacs/mdlib/mdebin.cpp
src/programs/mdrun/md.cpp