Skip to content

Commit dceaafb

Browse files
alextdFluffierThanThou
authored andcommitted
Fix Forestry in growing zones (#113)
Missing key in dictionary? Check if key exists first.
1 parent ed806de commit dceaafb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/ManagerJobs/ManagerJob_Forestry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public void DoClearAreaDesignations( IEnumerable<IntVec3> cells, ref bool workDo
205205
continue;
206206

207207
// if the plant is not in the allowed filter
208-
if ( !AllowedTrees[plant.def] )
208+
if (!AllowedTrees.ContainsKey(plant.def) || !AllowedTrees[plant.def] )
209209
continue;
210210

211211
// we don't cut stuff in growing zones

0 commit comments

Comments
 (0)