diff --git a/drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java b/drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java
index <HASH>..<HASH> 100644
--- a/drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java
+++ b/drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java
@@ -167,7 +167,13 @@ public class ReteooBuilder
             final RuleRemovalContext context = new RuleRemovalContext( rule );
             context.setKnowledgeBase( kBase );
 
-            for ( BaseNode node : rules.remove( rule.getFullyQualifiedName() ) ) {
+            BaseNode[] rulesTerminalNodes = rules.remove( rule.getFullyQualifiedName() );
+            if (rulesTerminalNodes == null) {
+                // there couldn't be any rule to be removed if it comes from a broken drl
+                continue;
+            }
+
+            for ( BaseNode node : rulesTerminalNodes ) {
                 removeTerminalNode( context, (TerminalNode) node, workingMemories );
             }
[RHDM-<I>] avoid NPE when trying to remove a not existing rule coming from a broken drl during an incremental compilation