prevent from booh-classifier aborting when applying a label to the last element while...
[booh] / bin / booh-classifier
index 7ca3ed3aadf452373203559fa50dc7160e13e7c2..286dd90d5daec097c87f37d62873cfbdb5c6d91d 100755 (executable)
@@ -662,13 +662,13 @@ class MainView < Gtk::DrawingArea
         if index < $allentries.size - 1
             index += 1
         end
         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
             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
             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
             try_show_entry($allentries[index])
         end
     end