From 97944aa9811bfdddea4dca25d989bd18f166de5c Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Wed, 25 Feb 2015 12:15:38 -0300 Subject: [PATCH] hotspot for stable --- app/controllers/my_profile/profile_design_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/my_profile/profile_design_controller.rb b/app/controllers/my_profile/profile_design_controller.rb index 5a6aa97..456aaec 100644 --- a/app/controllers/my_profile/profile_design_controller.rb +++ b/app/controllers/my_profile/profile_design_controller.rb @@ -8,7 +8,8 @@ class ProfileDesignController < BoxOrganizerController def protect_fixed_block block = boxes_holder.blocks.find(params[:id].gsub(/^block-/, '')) - if block.fixed && !current_person.is_admin? + if !block.nil? && block.fixed && !current_person.is_admin? + render_access_denied end end -- libgit2 0.21.2