--- viewsdisplaytabs.module.orig        2010-10-11 11:13:00.000000000 +0200
+++ viewsdisplaytabs.module     2010-10-11 11:14:31.000000000 +0200
@@ -77,6 +77,14 @@ function viewsdisplaytabs_preprocess_vie
     foreach ($view->display as $display_name => $display_data) {
       if (!$selected_displays || !count($selected_displays) || in_array($display_name, $selected_displays)) {
 
+        // Get number of results for each display, and hide display if no result
+        $display_view = $view->clone_view();
+        $display_results = views_get_view_result($display_view->name, $display_name);
+        $display_results = count($display_results);
+        if ($display_results == 0) {
+          break;
+        }
+
         // Allow grouping of tabs with grouping separator in titles/names: group[sep]title
         // If the separator is at position 0 or does not exist it all, do not group
         $sep = $settings['view_group_separator'][$view->name];
