Index: views_cloud.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_cloud/views_cloud.module,v
retrieving revision 1.5
diff -u -r1.5 views_cloud.module
--- views_cloud.module	17 Nov 2009 21:35:09 -0000	1.5
+++ views_cloud.module	17 Nov 2009 23:46:15 -0000
@@ -22,15 +22,20 @@
 
   $view = $vars['view'];
 
-  $result   = $vars['rows'];
+  $result = $vars['rows'];
   $vars['rows'] = array();
 
-  $handler  = $view->style_plugin;
+  $handler = $view->style_plugin;
   $weight_field = $view->style_plugin->options['weight_field'];
   $hide = $view->style_plugin->options['hide_weight_field'];
-  $fields   = &$view->field;
+  $fields = &$view->field;
   $weight_field_alias = $fields[$weight_field]->field_alias;
 
+  // A quick error check. If no weight field is set, do not display anything.
+  if (empty($row->{$weight_field_alias})) {
+    drupal_set_message(t('The cloud style could not be shown because a weight field is not set.'), 'error');
+    return;
+  }
 
   $min = PHP_INT_MAX;
   $max = -PHP_INT_MAX;
