Permalink
Browse files

Another nil check for version tracker

  • Loading branch information...
1 parent 5ffb748 commit cb9dfd7b1a44cf1728fb2c3d7032f7ef5ab9f480 @jnraine committed Jun 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/package.rb
View
2 app/models/package.rb
@@ -316,7 +316,7 @@ def icon
begin
i = Icon.find(icon_id)
rescue ActiveRecord::RecordNotFound
- i = package_branch.version_tracker.icon
+ i = package_branch.version_tracker.icon if package_branch.version_tracker
i ||= package_category.icon if package_category.respond_to?(:icon)
end
i

0 comments on commit cb9dfd7

Please sign in to comment.