--- quicktabs.module.old	2009-03-20 20:34:16.000000000 -0500
+++ quicktabs.module	2009-08-13 12:05:43.000000000 -0500
@@ -162,6 +162,18 @@ function quicktabs_block($op = 'list', $
  * Render quicktabs.
  */
 function quicktabs_render($quicktabs) {
+
+  // convert views arguments to an array, retrieving %-style args from url
+  $quicktabs['tabs'] = _quicktabs_prepare_views_args($quicktabs['tabs']);
+	
+	// Render all tabpgages. Unset empty
+	foreach ($quicktabs['tabs'] as $key => $tab) {
+		$quicktabs['tabs'][$key]['value'] = quicktabs_render_tabpage($tab);
+		if(empty($quicktabs['tabs'][$key]['value'])){
+			unset($quicktabs['tabs'][$key]);
+		}
+	}
+
   $tabs_count = count($quicktabs['tabs']);
   if ($tabs_count <= 0) {
     return '';
@@ -170,8 +182,6 @@ function quicktabs_render($quicktabs) {
   if ($quicktabs['style'] == 'default') {
     $quicktabs['style'] = variable_get('quicktabs_tabstyle', 'nostyle');
   }
-  // convert views arguments to an array, retrieving %-style args from url
-  $quicktabs['tabs'] = _quicktabs_prepare_views_args($quicktabs['tabs']);
 
   quicktabs_add_css($quicktabs['style']);
   $javascript = drupal_add_js('misc/progress.js', 'core');
@@ -441,7 +451,7 @@ function quicktabs_load($qtid) {
  * Render quicktabs tabpage.
  */
 function quicktabs_render_tabpage($tab) {
-  $output = '&nbsp;';
+  $output = '';			//make output really empty()
   switch ($tab['type']) {
     case 'qtabs':
       if (isset($tab['qtid'])) {
@@ -455,9 +465,9 @@ function quicktabs_render_tabpage($tab) 
         if (module_exists('views')) {
           if ($view = views_get_view($tab['vid'])) {
             if ($view->access($tab['display'])) {
-              $view->set_display($tab['display']);
-              $view->set_arguments($tab['args']);
-              $output = $view->preview();
+							$view_markup = $view->preview($tab['display'], $tab['args']);
+							if($view->result) { $output = $view_markup; }
+							else { $output = ''; }
             }
             else {
               $output = t('You are not authorized to access this content.');
