From: wmorgan Date: Tue, 12 Jun 2007 20:29:23 +0000 (+0000) Subject: bugfix: ignore nil ids passed to BufferManager#clear X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=3c9c3e4561e0997c2c74b53dfdbb2dc57df2c8a3;p=sup bugfix: ignore nil ids passed to BufferManager#clear git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@448 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index bb94fbe..cfcf40b 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -444,6 +444,7 @@ class BufferManager ## a little tricky because we can't just delete_at id because ids ## are relative (they're positions into the array). def clear id + next unless id # not sure why this happens---thread stuff? @minibuf_mutex.synchronize do @minibuf_stack[id] = nil if id == @minibuf_stack.length - 1