Skip to content

Commit 5235126

Browse files
committed
better fix for NRE when destroying propbatcher
1 parent 8638fa6 commit 5235126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RasterPropMonitor/Auxiliary modules/PropBatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ void LateUpdate()
329329

330330
void OnDestroy()
331331
{
332-
if (part != null)
332+
if (labelBatches.Count > 0)
333333
{
334334
RasterPropMonitorComputer rpmComp = RasterPropMonitorComputer.FindFromProp(internalProp);
335335
foreach (var labelBatch in labelBatches)

0 commit comments

Comments
 (0)