From 072cd456b6bc57aa0dc7aea3678668c3f099368f Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Mon, 26 Sep 2011 18:42:05 +0000
Subject: [PATCH] [gh-206] Merging from testing into staging

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1081 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/unl.module | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module
index a72a27ae..bacbb2ef 100644
--- a/sites/all/modules/unl/unl.module
+++ b/sites/all/modules/unl/unl.module
@@ -1064,12 +1064,15 @@ function unl_block_view_alter(&$data, $block) {
 /**
  * Tries to implement hook_block_view_MODULE_DELTA_alter, but since the delta contains a -,
  * this is actually called from unl_block_view_alter() for now.
- * Used to determin if a "sub-menu" should be used instead of the normal menu.
+ * Used to determine if a "sub-menu" should be used instead of the normal menu.
  * @param array $data
  * @param stdClass $block
  */
 function unl_block_view_system_main_menu_alter(&$data, $block) {
   $current_menu_link = _unl_get_current_menu_link();
+  if (!$current_menu_link) {
+    return;
+  }
   $submenu = _unl_get_current_submenu($data['content'], $current_menu_link->mlid);
   if ($submenu && $submenu['#original_link']['depth'] > 1) {
     $data['content'] = $submenu['#below'];
-- 
GitLab