Fixes and updates to BlueGene/Q support
[alexxy/gromacs.git] / src / gromacs / gmxlib / oenv.cpp
index ebe3d156da1961303144cfc9460121b2a3cef3d4..01eda5251e052252720b8f6c50a5dea05c5a4e8a 100644 (file)
@@ -204,28 +204,40 @@ xvg_format_t output_env_get_xvg_format(const output_env_t oenv)
 
 const char *output_env_get_program_name(const output_env_t oenv)
 {
+    const char *programName = NULL;
+
     try
     {
-        return oenv->programContext.fullBinaryPath();
+        programName = oenv->programContext.fullBinaryPath();
     }
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+    return programName;
 }
 
 const char *output_env_get_short_program_name(const output_env_t oenv)
 {
+    const char *programName = NULL;
+
     try
     {
         // TODO: Use the display name once it doesn't break anything.
-        return oenv->programContext.programName();
+        programName = oenv->programContext.programName();
     }
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+    return programName;
 }
 
 const char *output_env_get_cmd_line(const output_env_t oenv)
 {
+    const char *commandLine = NULL;
+
     try
     {
-        return oenv->programContext.commandLine();
+        commandLine = oenv->programContext.commandLine();
     }
     GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+
+    return commandLine;
 }