=== modified file 'uc_attribute/uc_attribute.module'
--- uc_attribute/uc_attribute.module	2009-02-03 14:32:57 +0000
+++ uc_attribute/uc_attribute.module	2009-02-04 20:36:01 +0000
@@ -533,20 +533,21 @@
  * Helper function for uc_attribute_form_alter()
  */
 function _uc_attribute_alter_form($product) {
+  // If the product doesn't have attributes, return the form as it is.
+  if (!isset($product->attributes) || !is_array($product->attributes)) {
+    return NULL;
+  }
+
   $nid = $product->nid;
   $qty = $product->default_qty;
   if (!$qty) {
     $qty = 1;
   }
+  
   // Load all product attributes for the given nid.
   $priced_attributes = uc_attribute_priced_attributes($nid);
   $attributes = $product->attributes;
 
-  // If the product doesn't have attributes, return the form as it is.
-  if (!is_array($attributes)) {
-    return NULL;
-  }
-
   $form_attributes = array();
 
   // Loop through each product attribute and generate its form element.

