mirror of
https://github.com/darlinghq/xcbuild.git
synced 2024-12-11 14:14:08 +00:00
Avoid returning a default SDK for a platform with no SDKs.
This would crash if a platform name matched, but it had no SDKs.
This commit is contained in:
parent
b55e87094e
commit
f609fb944d
@ -47,9 +47,11 @@ findTarget(std::string const &name) const
|
||||
|
||||
/* If the platform name matches but no targets do, use any target. */
|
||||
if (platform->name() == name || platform->path() == name) {
|
||||
if (!platform->targets().empty()) {
|
||||
return platform->targets().back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user