]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3893 Fixed uncaught error when no source is available
authorJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Tue, 23 Apr 2013 12:54:30 +0000 (14:54 +0200)
committerJean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com>
Tue, 23 Apr 2013 12:54:30 +0000 (14:54 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb

index 85b20025986db70432a4ac8893b4bb3838674e19..d9b6fb8d00ee6ded00105b64ba1b8b063e737e41 100644 (file)
@@ -162,7 +162,7 @@ class ResourceController < ApplicationController
     @display_manual_violation_form=(current_user && has_role?(:user, @snapshot))
 
     panel = get_html_source_panel(@snapshot, {:display_scm => true})
-    @lines = panel.html_lines
+    @lines = panel.html_lines unless panel.nil?
   end
 
   def init_scm