diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-08 16:04:09 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-08 16:04:09 +0100 |
commit | 7edc07604a25446f4b75726ae8fd72bc4277b160 (patch) | |
tree | a5b21c7674fbcdc29ff36fcbf0a076266a2544ae /sonar-server/src/main/webapp/WEB-INF | |
parent | 132ad21a30449597724ed53d8d03fdc20aca5a5e (diff) | |
download | sonarqube-7edc07604a25446f4b75726ae8fd72bc4277b160.tar.gz sonarqube-7edc07604a25446f4b75726ae8fd72bc4277b160.zip |
SONAR-3277 NPE on duplications tab when a project has been deleted
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index a2c95f67883..710b796937a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -292,9 +292,9 @@ class ResourceController < ApplicationController resource = Project.by_key(resource_key) resource_by_key[resource_key] = resource end - dup_group << {:resource => resource, :lines_count => block.attributes['l'], :from_line => block.attributes['s']} + dup_group << {:resource => resource, :lines_count => block.attributes['l'], :from_line => block.attributes['s']} if resource end - duplication_groups << dup_group + duplication_groups << dup_group if dup_group.size > 1 end end |