tolerate null query on Mailbox
authoradam <adam@megacz.com>
Thu, 24 Jun 2004 01:27:00 +0000 (01:27 +0000)
committeradam <adam@megacz.com>
Thu, 24 Jun 2004 01:27:00 +0000 (01:27 +0000)
darcs-hash:20040624012700-5007d-4751e02cdfd92d7e55df09450e3e0b130ebab28c.gz

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; }
         }
     }