mirror of
https://github.com/ksherlock/mpw.git
synced 2024-12-22 00:29:18 +00:00
fix null path string crash
This commit is contained in:
parent
3a24ce64b6
commit
fa03797e98
@ -661,8 +661,10 @@ std::string find_exe(const std::string &name)
|
||||
if (name.find('/') != name.npos) return std::string();
|
||||
|
||||
// check in $MPW/name.
|
||||
const char *cpath = getenv("mpw_path");
|
||||
if (!cpath) return std::string();
|
||||
|
||||
path = getenv("mpw_path");
|
||||
path = cpath;
|
||||
// split on :
|
||||
|
||||
if (path.empty()) return std::string();
|
||||
|
Loading…
Reference in New Issue
Block a user