mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Take into account that PATH could be empty
This commit is contained in:
		| @@ -2082,10 +2082,13 @@ bool Gnuplot::get_program_path() | |||||||
|     // Retrieves a C string containing the value of environment variable PATH |     // Retrieves a C string containing the value of environment variable PATH | ||||||
|     path = std::getenv("PATH"); |     path = std::getenv("PATH"); | ||||||
|     std::stringstream s; |     std::stringstream s; | ||||||
|     s << path; |     if (!path) | ||||||
|     if (s.fail()) |  | ||||||
|         { |         { | ||||||
|             throw GnuplotException("Path is not set"); |             s << path; | ||||||
|  |         } | ||||||
|  |     if (s.fail() or s.gcount() == 0) | ||||||
|  |         { | ||||||
|  |             throw GnuplotException("PATH is not set"); | ||||||
|         } |         } | ||||||
|     std::string path_str = s.str(); |     std::string path_str = s.str(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez