don't delete icons while we're deleting others
[embrace.git] / bin / embrace
index b586afe5b4c12e206a7f2c092e05fee384355456..2316b0ddbc3cc8bd703a4260109e85e4efc38849 100755 (executable)
@@ -193,7 +193,7 @@ module Embrace
                end
 
                def each
-                       @icons.each { |i| yield i }
+                       @icons.compact.each { |i| yield i }
                end
 
                def <<(i)
@@ -235,6 +235,7 @@ module Embrace
 
                def delete_at(i)
                        Kernel.raise(ContainerLockedError) unless @about_to_add.zero?
+                       Kernel.raise(ContainerLockedError) unless @add_lock_count.zero?
 
                        # icons that are placed above the one that's deleted need
                        # to be moved