diff --git a/Source/Core/GZBuilder/GZGeneral.cs b/Source/Core/GZBuilder/GZGeneral.cs
index 20e9ce0af696a5bea4f6027b4fb2ef68e57a881b..0507f1e85467d3bb722ce38800ddbc749f95ad50 100644
--- a/Source/Core/GZBuilder/GZGeneral.cs
+++ b/Source/Core/GZBuilder/GZGeneral.cs
@@ -110,8 +110,10 @@ namespace CodeImp.DoomBuilder.GZBuilder
 
             //and for actors defined in DECORATE
             ICollection<ActorStructure> ac = General.Map.Data.Decorate.Actors;
-            foreach (ActorStructure actor in General.Map.Data.Decorate.Actors)
-                Actors.Add(actor.ClassName.ToLower(), actor.DoomEdNum);
+            foreach (ActorStructure actor in ac) {
+                if (actor.DoomEdNum != -1) //we don't need actors without DoomEdNum
+                    Actors.Add(actor.ClassName.ToLower(), actor.DoomEdNum);
+            }
 
             Dictionary<string, ModelDefEntry> modelDefEntriesByName = new Dictionary<string, ModelDefEntry>();