Fixed crash if you save a bundle outside the default bundle folder (#4974) (#5255)

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
monroegm-disable-blank-issue-2
AMZN-stankowi 4 years ago committed by GitHub
parent de4e2d6308
commit 2df8d5b620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,8 +61,12 @@ namespace AssetBundler
{
AZStd::string absolutePath = filePath.toUtf8().data();
if (AZ::IO::FileIOBase::GetInstance()->Exists(absolutePath.c_str()))
{
AZStd::string projectName = pathToProjectNameMap.at(absolutePath);
{
AZStd::string projectName;
if (pathToProjectNameMap.contains(absolutePath))
{
projectName = pathToProjectNameMap.at(absolutePath);
}
// If a project name is already specified, then the associated file is a default file
LoadFile(absolutePath, projectName, !projectName.empty());

Loading…
Cancel
Save