diff --git a/src/org/zaproxy/zap/extension/alert/AlertTreeModel.java b/src/org/zaproxy/zap/extension/alert/AlertTreeModel.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/extension/alert/AlertTreeModel.java
+++ b/src/org/zaproxy/zap/extension/alert/AlertTreeModel.java
@@ -219,7 +219,9 @@ class AlertTreeModel extends DefaultTreeModel {
         		// Parent has no other children, remove it also

         		this.removeNodeFromParent(parent);

                 nodeStructureChanged((AlertNode) this.getRoot());

-        	}

+            } else if (parent.getUserObject() == node.getUserObject()) {

+                parent.setUserObject(parent.getChildAt(0).getUserObject());

+            }

         }

     }
Issue <I> - NullPointerException while selecting a node in the "Alerts" tab after deleting a message

Changed AlertTreeModel to set another alert to parent's leaf if it contains the alert of the deleted leaf.