[minor] [fix] cart
diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py
index c85dd8f..daecaa6 100644
--- a/erpnext/shopping_cart/cart.py
+++ b/erpnext/shopping_cart/cart.py
@@ -93,7 +93,7 @@
 	set_cart_count(quotation)
 
 	context = get_cart_quotation(quotation)
-	
+
 	if cint(with_items):
 		return {
 			"items": frappe.render_template("templates/includes/cart/cart_items.html",
@@ -106,12 +106,12 @@
 			'name': quotation.name,
 			'shopping_cart_menu': get_shopping_cart_menu(context)
 		}
-		
+
 @frappe.whitelist()
 def get_shopping_cart_menu(context=None):
 	if not context:
 		context = get_cart_quotation()
-		
+
 	return frappe.render_template('templates/includes/cart/cart_dropdown.html', context)
 
 @frappe.whitelist()
@@ -307,6 +307,8 @@
 		return frappe.get_doc(party_doctype, party)
 
 	else:
+		if not cart_settings.enabled:
+			return None
 		customer = frappe.new_doc("Customer")
 		fullname = get_fullname(user)
 		customer.update({
@@ -368,6 +370,9 @@
 	if not party:
 		party = get_party()
 
+	if not party:
+		return []
+
 	address_docs = frappe.db.sql("""select * from `tabAddress`
 		where `{0}`=%s order by name limit {1}, {2}""".format(party.doctype.lower(),
 			limit_start, limit_page_length), party.name,