Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Energy, onHostDestruction: ensured ptr existence
authorMillian Poquet <millian.poquet@inria.fr>
Tue, 9 Feb 2016 15:30:16 +0000 (16:30 +0100)
committerMillian Poquet <millian.poquet@inria.fr>
Tue, 9 Feb 2016 15:30:16 +0000 (16:30 +0100)
commite99158dd85fe789ea5e1a40c29f196fa6c715bcf
tree0c3e3f8730fb7b9d206792b977b05b53501e42d6
parent67e88ab9635136f62aab0b9e68f05d16fab123f5
Energy, onHostDestruction: ensured ptr existence

Our simulator crashed after the main termination,
which was caused by the Simgrid energy plugin
calling host_energy->update() whereas host_energy
was null.

This commit simply adds a test about host_energy
being null or not before using it in function
onHostDestruction of src/surf/plugins/energy.cpp.
src/surf/plugins/energy.cpp