tolerate null query on Mailbox
[org.ibex.mail.git] / src / org / ibex / mail / target / Mailbox.java
index bc8b5de..275c32e 100644 (file)
@@ -150,7 +150,9 @@ public abstract class Mailbox extends Target {
         class QueryIterator extends Mailbox.Iterator.Wrapper {
             Query q;
             public QueryIterator(Query q, Mailbox m) { super(m.iterator()); this.q = q; }
-            public boolean next() { do { if (!super.next()) return false; } while(!q.match(this)); return true; }
+            public boolean next() {
+               if (q == null) return false;
+               do { if (!super.next()) return false; } while(!q.match(this)); return true; }
         }
     }