diff --git a/cache_actions.rules.inc b/cache_actions.rules.inc
index 6862ad3..21e258a 100644
--- a/cache_actions.rules.inc
+++ b/cache_actions.rules.inc
@@ -361,14 +361,21 @@ function cache_actions_action_clear_views_display_cache($views) {
         if (!isset($loaded_views[$view_name])) {
           $loaded_views[$view_name] = views_get_view($view_name);
         }
-        // Check to see that the display has a caching plugin. If it doesn't
-        // add the default caching plugin.
         $display = $loaded_views[$view_name]->display[$display_id];
-        if (!isset($display->display_options['cache']['type'])) {
-          $display->display_options['cache']['type'] = $loaded_views[$view_name]->display['default']->display_options['cache']['type'];
+        if (!isset($display->id)) {
+          watchdog('cache_actions', 'Attempt to clear non-existent display %display for view %view', array(
+            '%view' => $view_name, '%display' => $display_id
+            ), WATCHDOG_ERROR);
+        }
+        else {
+          // Check to see that the display has a caching plugin. If it doesn't
+          // add the default caching plugin.
+          if (!isset($display->display_options['cache']['type'])) {
+            $display->display_options['cache']['type'] = $loaded_views[$view_name]->display['default']->display_options['cache']['type'];
+          }
+          // And then clear the cache.
+          _cache_actions_clear_view_display($loaded_views[$view_name], $display);
         }
-        // And then clear the cache.
-        _cache_actions_clear_view_display($loaded_views[$view_name], $display);
       }
     }
   }
@@ -386,12 +393,19 @@ function _cache_actions_clear_view($view) {
   if (is_object($view)) {
     // Go through all displays and clear the cache.
     foreach ($view->display as $display) {
-      // If we don't have our own cache plugin, then we need to copy
-      // the cache settings from default.
-      if (!isset($display->display_options['cache']) && isset($view->display['default'])) {
-        $display->display_options['cache'] = $view->display['default']->display_options['cache'];
+      if (!isset($display->id)) {
+        watchdog('cache_actions', 'Attempt to clear non-existent display %display for view %view', array(
+          '%view' => $view_name, '%display' => $display_id
+          ), WATCHDOG_ERROR);
+      }
+      else {
+        // If we don't have our own cache plugin, then we need to copy
+        // the cache settings from default.
+        if (!isset($display->display_options['cache']) && isset($view->display['default'])) {
+          $display->display_options['cache'] = $view->display['default']->display_options['cache'];
+        }
+        _cache_actions_clear_view_display($view, $display);
       }
-      _cache_actions_clear_view_display($view, $display);
     }
   }
   else {
