diff options
author | Michael R. Fisher <mfisher@bketech.com> | 2013-07-14 21:06:25 -0500 |
---|---|---|
committer | Michael R. Fisher <mfisher@bketech.com> | 2013-07-14 21:06:25 -0500 |
commit | 23bf9b11c64037bba655b66ee36301e63fe5bd0c (patch) | |
tree | 7c44b3c66a79dc705f40ff2a426bdb07b39c535e | |
parent | 6827261766a678b69b15394e645478ab78133eb6 (diff) |
Use a static string variable for dll path.
Making this consistent with all other funtions in this file.
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 73bfaff137..bea0e330b9 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -86,11 +86,14 @@ user_config_directory () std::string ardour_dll_directory () { - std::string s = Glib::getenv("ARDOUR_DLL_PATH"); + static std::string s; + if (s.empty()) { - std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n"); - ::exit (1); - } + s = Glib::getenv("ARDOUR_DLL_PATH"); + std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n"); + ::exit (1); + } + return s; } |