From: Guillaume Cottenceau Date: Fri, 20 Jun 2008 22:18:15 +0000 (+0200) Subject: prevent from booh-classifier aborting when applying a label to the last element while... X-Git-Tag: 0.9.2~60 X-Git-Url: http://git.zarb.org/?p=booh;a=commitdiff_plain;h=ca51886be0dc114ad66bfb4b603950f3ca614d73;hp=ab2d7aa791072aa3fe3a18c18219cd452c3f5912 prevent from booh-classifier aborting when applying a label to the last element while more elements are yet to be loaded --- diff --git a/bin/booh-classifier b/bin/booh-classifier index 7ca3ed3..286dd90 100755 --- a/bin/booh-classifier +++ b/bin/booh-classifier @@ -662,13 +662,13 @@ class MainView < Gtk::DrawingArea if index < $allentries.size - 1 index += 1 end - while index < $allentries.size - 1 && $allentries[index] && ! $allentries[index].button.visible? + while index < $allentries.size - 1 && $allentries[index] && $allentries[index].button && ! $allentries[index].button.visible? index += 1 end - while $allentries[index] && ! $allentries[index].button.visible? && index > 0 + while $allentries[index] && $allentries[index].button && ! $allentries[index].button.visible? && index > 0 index -= 1 end - if index < $allentries.size && $allentries[index] && $allentries[index].button.visible? + if index < $allentries.size && $allentries[index] && $allentries[index].button && $allentries[index].button.visible? try_show_entry($allentries[index]) end end