diff --git uc_discount.module uc_discount.module
old mode 100644
new mode 100755
index 2a4725e..23c23c5
--- uc_discount.module
+++ uc_discount.module
@@ -715,6 +715,10 @@ function uc_discount_get_discount_forms($form_state, $settings, $key = NULL) {
 function uc_discount_calculate_discounts($order) {
   global $user;
 
+  if(!isset($order->products) || empty($order->products)) {
+    return array();
+  }
+
   if (isset($order->uid)) {
     $account = user_load($order->uid);
   }
