Crash / null pointer dereference in FNiagaraEditorModule::PrecompileDuplicate().
File: Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraCompiler.cpp
Function: FNiagaraEditorModule::PrecompileDuplicate (line 1282)
Crash site: line ~1406, inside the third loop marked with the comment "// Now we can finish off the emitters." (loop starts at line 1392).
The loop guard at line 1399 is:
if (Handle.GetIsEnabled() && Handle.GetInstance().Emitter && (OwningEmitter == nullptr || OwningEmitter == Handle.GetInstance().Emitter))
but the body at line 1406 dereferences Handle.GetEmitterData():
BasePtr->EmitterData[i]->FinishPrecompileDuplicate(
EncounterableEmitterVariables,
StaticVariablesFromEmitter,
ConstantResolver,
&Handle.GetEmitterData()>GetSimulationStages(), // <- crashes when GetEmitterData() returns nullptr
((FNiagaraCompileRequestData*)OwningSystemRequestData)>EmitterData[i]>RapidIterationParams);
FNiagaraEmitterHandle::GetEmitterData() (NiagaraEmitterHandle.cpp:243) is:
FVersionedNiagaraEmitterData* FNiagaraEmitterHandle::GetEmitterData() const
{ return EmitterMode == ENiagaraEmitterMode::Standard ? VersionedInstance.GetEmitterData() : nullptr; }So when EmitterMode is anything other than Standard (e.g. Stateless), Handle.GetInstance().Emitter can be non-null while GetEmitterData() returns nullptr → null deref on ->GetSimulationStages().
=== Why this is a regression vs. sibling code ===
The two earlier loops in the same file marked with the identical "// Now we can finish off the emitters." comment (NiagaraCompiler.cpp:1064 and :1197) gate on GetEmitterData() directly:
if (Handle.GetIsEnabled() && Handle.GetEmitterData()) // Don't pull in the emitter if it isn't going to be used.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-377408 in the post.
| 0 |
| Component | UE - Niagara |
|---|---|
| Affects Versions | 5.7 |
| Target Fix | 42.00 |
| Fix Commit | 53431263 |
|---|
| Created | Apr 30, 2026 |
|---|---|
| Resolved | May 1, 2026 |
| Updated | May 19, 2026 |