From f9961d971e5c119335cbad1b4b62337ef7739b51 Mon Sep 17 00:00:00 2001
From: Damian Minkov <damencho@jitsi.org>
Date: Mon, 21 Jun 2010 15:00:58 +0000
Subject: Fix NPE when removing group.

---
 .../sip/communicator/impl/gui/main/contactlist/TreeContactList.java  | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/net')

diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
index 1265e8f..d6a2db1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
@@ -896,6 +896,11 @@ public class TreeContactList
 
         UIGroup parentGroup = group.getParentGroup();
 
+        // when metalist removes non empty group, first removes the
+        // contacts and with the last one it removes the group, as its non empty
+        if(parentGroup == null)
+            return;
+
         GroupNode parentGroupNode
             = parentGroup.getGroupNode();
 
-- 
cgit v1.1