Fix GHI 4041 Terrain Shader Crash (#4050)
The terrain feature processor was crashing due to an invalid shader name. The shader name has been fixed, but the feature processor has also been hardened so that it no longer crashes if a shader fails to load. Also, while testing, this inadvertently exposed a second crash in EntitySerializer that occurs when components don't serialize in correctly. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -84,8 +84,9 @@ namespace AZ
|
||||
static TypeId genericComponentWrapperTypeId("{68D358CA-89B9-4730-8BA6-E181DEA28FDE}");
|
||||
for (auto& [componentKey, component] : componentMap)
|
||||
{
|
||||
// if underlying type is genericComponentWrapperTypeId, the template is null and the component should not be addded
|
||||
if (component->GetUnderlyingComponentType() != genericComponentWrapperTypeId)
|
||||
// if the component didn't serialize (i.e. is null) or the underlying type is genericComponentWrapperTypeId, the
|
||||
// template is null and the component should not be addded
|
||||
if (component && (component->GetUnderlyingComponentType() != genericComponentWrapperTypeId))
|
||||
{
|
||||
entityInstance->m_components.emplace_back(component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user