Index: custom_breadcrumbs_taxonomy.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/Attic/custom_breadcrumbs_taxonomy.module,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 custom_breadcrumbs_taxonomy.module
--- custom_breadcrumbs_taxonomy.module	2 Aug 2009 23:18:49 -0000	1.1.2.9
+++ custom_breadcrumbs_taxonomy.module	5 Aug 2009 12:35:11 -0000
@@ -177,44 +177,45 @@
 function custom_breadcrumbs_taxonomy_views_pre_render(&$view) {
   if (variable_get('custom_breadcrumbs_taxonomy_views', FALSE)) {
     // Set the taxonomy breadcrumb for the view.
-    if (!empty($view->display)) {
+    if (isset($view->display) && !empty($view->display)) {
       foreach ($view->display as $display) {
         if (module_exists('panels') && panels_get_current_page_display()) continue;
-        if (!empty($display->display_options['arguments'])) {
+        if (isset($display->display_options['arguments']) && !empty($display->display_options['arguments'])) {
           // Try to use the view argument to generate the breadcrumb.
           foreach ($display->display_options['arguments'] as $argument) {
-            $args = $display->handler->view->args;
-            $arg = array_pop($args);
-            $tid = NULL;
-            $vid = NULL;
-            switch ($argument['id']) {
-              case 'tid':
-              case 'term_node_tid_depth':
-                $terms = taxonomy_terms_parse_string($arg);
-                $tid = empty($terms['tids']) ? NULL : $terms['tids'][0];
-                break;
-              case 'name':
-                if (drupal_substr($argument['table'], 0, 5) == 'term_') {
-                  $terms = taxonomy_get_term_by_name($arg);
-                  $tid = empty($terms) ? NULL : $terms[0]->tid;
-                }
-                break;
-              case 'vid':
-                $vid = $arg;
-                break;
-            }
-            if (!is_null($tid) || !is_null($vid)) {
-              module_load_include('inc', 'custom_breadcrumbs_taxonomy');
-              $terms = array();
-              if (!is_null($tid)) {
-                $term = taxonomy_get_term($tid);
-                $vid = $term->vid;
-                if ($term) {
-                  $terms[$term->tid] = $term;
+            if (isset($display->handler->view->args) && is_array($display->handler->view->args)) {
+              $arg = array_pop($display->handler->view->args);              
+              $tid = NULL;
+              $vid = NULL;
+              switch ($argument['id']) {
+                case 'tid':
+                case 'term_node_tid_depth':
+                  $terms = taxonomy_terms_parse_string($arg);
+                  $tid = empty($terms['tids']) ? NULL : $terms['tids'][0];
+                  break;
+                case 'name':
+                  if (drupal_substr($argument['table'], 0, 5) == 'term_') {
+                    $terms = taxonomy_get_term_by_name($arg);
+                    $tid = empty($terms) ? NULL : $terms[0]->tid;
+                  }
+                  break;
+                case 'vid':
+                  $vid = $arg;
+                  break;
+              }
+              if (!is_null($tid) || !is_null($vid)) {
+                module_load_include('inc', 'custom_breadcrumbs_taxonomy');
+                $terms = array();
+                if (!is_null($tid)) {
+                  $term = taxonomy_get_term($tid);
+                  $vid = $term->vid;
+                  if ($term) {
+                    $terms[$term->tid] = $term;
+                  }
                 }
+                _custom_breadcrumbs_taxonomy_set_breadcrumb($tid, $vid, TRUE, array('view' => $view), $terms);
+                return;
               }
-              _custom_breadcrumbs_taxonomy_set_breadcrumb($tid, $vid, TRUE, array('view' => $view), $terms);
-              return;
             }
           }
         }

