--- uc_addresses.module	Sat Dec 12 03:00:04 2009
+++ uc_addresses.module	Sun Dec 13 18:30:01 2009
@@ -243,19 +243,20 @@
       // address
 
       if (variable_get('uc_addresses_require_address', TRUE)) {
-	$form = uc_addresses_pane_address('new', NULL, $edit);
-	$form = array($form['contents']);	 // Modify to what we need
-	$form[0]['#title'] = t('Address'); // Rename the fieldset
-	return $form;
+      	$form = uc_addresses_pane_address('new', NULL, $edit);
+      	$form = array($form['contents']);	 // Modify to what we need
+      	$form[0]['#title'] = t('Address'); // Rename the fieldset
+      	return $form;
       }
 
     case 'insert':
       // We're about to add the user to the database, so get the address
       // info and add it to the address table
-
-      $address = (object)$edit;
-      $address->is_default = 0;
-      _uc_addresses_db_add_address($address);
+      if (variable_get('uc_addresses_require_address', TRUE)) {
+        $address = (object)$edit;
+        $address->is_default = 0;
+        _uc_addresses_db_add_address($address);
+      }
       return;
 
     case 'delete':
