diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php
index aa39dae..bb425c0 100644
--- a/core/modules/views/lib/Drupal/views/ViewExecutable.php
+++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php
@@ -1294,7 +1294,12 @@ public function render($display_id = NULL) {
       $this->style_plugin->pre_render($this->result);
 
       // Let each area handler have access to the result set.
-      foreach (array('header', 'footer', 'empty') as $area) {
+      $areas = array('header', 'footer');
+      // Only call preRender() on the empty handlers if the result is empty.
+      if (empty($this->result)) {
+        $areas[] = 'empty';
+      }
+      foreach ($areas as $area) {
         foreach ($this->{$area} as $handler) {
           $handler->preRender($this->result);
         }
