Don't throw a NPE when operating on a destroyed list.

Change-Id: Ie4ca1fdd55031efa56448bf0237d0edab51ea349
This commit is contained in:
Danny Baumann 2015-06-11 10:52:18 +02:00 committed by Steve Kondik
parent 03f09f6450
commit 59553089b9

View File

@ -173,14 +173,14 @@ public class ImapList extends ImapElement {
for (ImapElement e : mList) { for (ImapElement e : mList) {
e.destroy(); e.destroy();
} }
mList = null; mList.clear();
} }
super.destroy(); super.destroy();
} }
@Override @Override
public String toString() { public String toString() {
return mList != null ? mList.toString() : "[null]"; return mList.toString();
} }
/** /**