diff --git a/views.module b/views.module
index aab3812..97428fc 100644
--- a/views.module
+++ b/views.module
@@ -845,7 +845,7 @@ function views_add_block_contextual_links(&$block, $view, $display_id, $block_ty
 function views_add_contextual_links(&$render_element, $location, $view, $display_id) {
   // Do not do anything if the view is configured to hide its administrative
   // links.
-  if (empty($view->hide_admin_links)) {
+  if (empty($view->hide_admin_links) && isset($view->display[$display_id]->display_plugin)) {
     // Also do not do anything if the display plugin has not defined any
     // contextual links that are intended to be displayed in the requested
     // location.
