diff --git a/fesom2_ci/xios/src/node/context.cpp b/fesom2_ci/xios/src/node/context.cpp index a33e23ca..39515bc9 100644 --- a/fesom2_ci/xios/src/node/context.cpp +++ b/fesom2_ci/xios/src/node/context.cpp @@ -494,7 +494,7 @@ namespace xios { { closeAllFile(); registryOut->hierarchicalGatherRegistry() ; - if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; + if (server->intraCommRank==0 && CXios::globalRegistry) CXios::globalRegistry->mergeRegistry(*registryOut) ; } //! Deallocate client buffers @@ -534,7 +534,7 @@ namespace xios { if (hasServer && !hasClient) { registryOut->hierarchicalGatherRegistry() ; - if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; + if (server->intraCommRank==0 && CXios::globalRegistry) CXios::globalRegistry->mergeRegistry(*registryOut) ; } //! Deallocate client buffers diff --git a/fesom2_test_refactoring/xios/src/node/context.cpp b/fesom2_test_refactoring/xios/src/node/context.cpp index a33e23ca..39515bc9 100644 --- a/fesom2_test_refactoring/xios/src/node/context.cpp +++ b/fesom2_test_refactoring/xios/src/node/context.cpp @@ -494,7 +494,7 @@ namespace xios { { closeAllFile(); registryOut->hierarchicalGatherRegistry() ; - if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; + if (server->intraCommRank==0 && CXios::globalRegistry) CXios::globalRegistry->mergeRegistry(*registryOut) ; } //! Deallocate client buffers @@ -534,7 +534,7 @@ namespace xios { if (hasServer && !hasClient) { registryOut->hierarchicalGatherRegistry() ; - if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; + if (server->intraCommRank==0 && CXios::globalRegistry) CXios::globalRegistry->mergeRegistry(*registryOut) ; } //! Deallocate client buffers