diff --git a/includes/theme.inc b/includes/theme.inc
index 9250522e4cfeda601e0fd0e4a2019b31cf851efe..111593e5aa47a1f87a04ae9bf29c3fcb5aafcf43 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1119,7 +1119,7 @@ function theme_links($links, $attributes = array('class' => 'links')) {
       if ($i == $num_links) {
         $class .= ' last';
       }
-      if ($link['href'] == $_GET['q']) {
+      if (isset($link['href']) && $link['href'] == $_GET['q']) {
         $class .= ' active';
       }
       $output .= '<li class="'. $class .'">';