mirror of
https://github.com/darlinghq/xcbuild.git
synced 2024-12-03 09:40:53 +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,7 +47,9 @@ 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) {
|
||||
return platform->targets().back();
|
||||
if (!platform->targets().empty()) {
|
||||
return platform->targets().back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user