about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index 0c8a4d9e..985abbf4 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -158,7 +158,8 @@ SELECT $cols FROM over WHERE over.num = ? LIMIT 1
 
                 foreach (@$nums) {
                         $sth->execute($_->[0]);
-                        my $smsg = $sth->fetchrow_hashref;
+                        # $cb may delete rows and invalidate nums
+                        my $smsg = $sth->fetchrow_hashref // next;
                         $smsg = PublicInbox::Over::load_from_row($smsg);
                         $cb->($self, $smsg, @arg) or return;
                 }