Use a static string variable for dll path.
authorMichael R. Fisher <mfisher@bketech.com>
Mon, 15 Jul 2013 02:06:25 +0000 (21:06 -0500)
committerMichael R. Fisher <mfisher@bketech.com>
Mon, 15 Jul 2013 02:06:25 +0000 (21:06 -0500)
Making this consistent with all other funtions in this file.

libs/ardour/filesystem_paths.cc

index 73bfaff137f726c0b9854d9516d552ebf8d7e958..bea0e330b9090ece99f0ce037e4e3b1bb63ab9cc 100644 (file)
@@ -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;
 }