From: Arnaud Giersch Date: Mon, 16 Oct 2017 11:25:42 +0000 (+0200) Subject: Allow nullptr for Extension deleter. X-Git-Tag: v3.18~443^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2618e74f3013e614762462ffb63bbe094fd1ae40 Allow nullptr for Extension deleter. --- diff --git a/include/xbt/Extendable.hpp b/include/xbt/Extendable.hpp index 5cf36a9525..d90314d4c8 100644 --- a/include/xbt/Extendable.hpp +++ b/include/xbt/Extendable.hpp @@ -77,7 +77,7 @@ public: * an extension of B might need to have the extension of A around when executing * its cleanup function/destructor. */ for (std::size_t i = extensions_.size(); i > 0; --i) - if (extensions_[i - 1] != nullptr) + if (extensions_[i - 1] != nullptr && deleters_[i - 1] != nullptr) deleters_[i - 1](extensions_[i - 1]); }