diff --git a/modules/commerce_kickstart/toolbar_megamenu/toolbar_megamenu.module b/modules/commerce_kickstart/toolbar_megamenu/toolbar_megamenu.module
index d1ba423..1ccfcad 100644
--- a/modules/commerce_kickstart/toolbar_megamenu/toolbar_megamenu.module
+++ b/modules/commerce_kickstart/toolbar_megamenu/toolbar_megamenu.module
@@ -186,7 +186,7 @@ function toolbar_megamenu_tree_output($tree, $balance = TRUE) {
       // the active class accordingly. But local tasks do not appear in menu
       // trees, so if the current path is a local task, and this link is its
       // tab root, then we have to set the class manually.
-      if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) {
+      if (!empty($router_item['tab_root_href']) && $data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) {
         $data['link']['localized_options']['attributes']['class'][] = 'active';
       }
 
