- Ensure we handle missing / invalid data interfaces when loading Niagara Systems

#rb frank.fella
#jira UE-194814

[CL 27719700 by stu mckenna in ue5-main branch]
This commit is contained in:
stu mckenna
2023-09-08 14:03:48 -04:00
parent 0613ca4793
commit 02ca4c55cd

View File

@@ -3371,6 +3371,13 @@ void UNiagaraComponent::CopyParametersFromAsset(bool bResetExistingOverrideParam
{
UNiagaraDataInterface* AssetDataInterface = AssetExposedParameters.GetDataInterface(i);
UNiagaraDataInterface* OverrideDataInterface = OverrideParameters.GetDataInterface(i);
if (!AssetDataInterface || !OverrideDataInterface)
{
const FNiagaraVariableBase* DIVariable = AssetExposedParameters.FindVariableFromDataInterfaceIndex(i);
UE_LOG(LogNiagara, Error, TEXT("null data interface found for Variable(%s) System(%s) will not run."), DIVariable ? *DIVariable->GetName().ToString() : TEXT("Unknown"), *GetNameSafe(Asset));
continue;
}
if (AssetDataInterface != OverrideDataInterface)
{
// We must copy the data regardless as there is an expectation that data interfaces are always reset to the original state