Index: banner.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/banner/banner.module,v
retrieving revision 1.72
diff -u -p -r1.72 banner.module
--- banner.module	10 Dec 2006 21:40:36 -0000	1.72
+++ banner.module	12 Dec 2006 11:25:14 -0000
@@ -898,6 +898,12 @@ function banner_display($group = 0, $cou
     $files = array('banner_db.php', 'banner_file.php');
     $tids = array();
 
+    // Do we have *any* banners in this group?
+    $banners = db_result(db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {term_node} tn on n.nid = tn.nid WHERE n.type ='banner' AND tn.tid = %d", $group));
+    if($banners == 0) {
+      return;
+    }
+
     // only do taxonomy checking on nodes
     if (arg(0) == 'node' && is_numeric(arg(1))) {
       // get vocabularies associated with banners
