summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ivy/Ivy.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Ivy/Ivy.cxx b/Ivy/Ivy.cxx
index e3c6bc6..fd762b6 100644
--- a/Ivy/Ivy.cxx
+++ b/Ivy/Ivy.cxx
@@ -83,7 +83,9 @@ const char * Ivy::GetDomain(const char *domainlist)
}
if ( domain.empty() )
{
- domain = getenv ( "IVYBUS" );
+ const char *env = getenv ( "IVYBUS" );
+ if ( env )
+ domain = env;
if ( domain.empty() )
domain = DEFAULT_DOMAIN;
}