diff --git a/modules/customer/commerce_customer.module b/modules/customer/commerce_customer.module index 5755103..7e8fd0c 100644 --- a/modules/customer/commerce_customer.module +++ b/modules/customer/commerce_customer.module @@ -111,12 +111,13 @@ function commerce_customer_profile_label($profile) { */ function commerce_customer_profile_default_label($profile) { $label = ''; - // If the profile has a default address field... if (!empty($profile->commerce_customer_address)) { // Wrap the customer profile object for easier access to its field data. $profile_wrapper = entity_metadata_wrapper('commerce_customer_profile', $profile); - $label = $profile_wrapper->commerce_customer_address->name_line->value(); + if (isset($profile_wrapper->commerce_customer_address->name_line)) { + $label = $profile_wrapper->commerce_customer_address->name_line->value(); + } } // Return the profile ID if we couldn't derive a label from an address field.