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