Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow nullptr for Extension deleter.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 11:25:42 +0000 (13:25 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 16 Oct 2017 11:26:37 +0000 (13:26 +0200)
include/xbt/Extendable.hpp

index 5cf36a9..d90314d 100644 (file)
@@ -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]);
   }