Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless cosmetics around NS3 long routes
[simgrid.git] / src / mc / Process.cpp
index 7ffd7b3..5b1f3c9 100644 (file)
@@ -248,8 +248,10 @@ Process::~Process()
     close(this->memory_file);
 
   if (this->unw_underlying_addr_space != unw_local_addr_space) {
-    unw_destroy_addr_space(this->unw_underlying_addr_space);
-    _UPT_destroy(this->unw_underlying_context);
+    if (this->unw_underlying_addr_space)
+      unw_destroy_addr_space(this->unw_underlying_addr_space);
+    if (this->unw_underlying_context)
+      _UPT_destroy(this->unw_underlying_context);
   }
 
   unw_destroy_addr_space(this->unw_addr_space);