mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-24 03:34:42 +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();
|
if (name.find('/') != name.npos) return std::string();
|
||||||
|
|
||||||
// check in $MPW/name.
|
// check in $MPW/name.
|
||||||
|
const char *cpath = getenv("mpw_path");
|
||||||
|
if (!cpath) return std::string();
|
||||||
|
|
||||||
path = getenv("mpw_path");
|
path = cpath;
|
||||||
// split on :
|
// split on :
|
||||||
|
|
||||||
if (path.empty()) return std::string();
|
if (path.empty()) return std::string();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user