From 9178c7fe628fe20da094b015c99da4866acbc53a Mon Sep 17 00:00:00 2001
From: Darren Oh <darren@oh.name>
Date: Wed, 26 Oct 2016 11:15:09 -0400
Subject: [PATCH] Issue #1390708 by milesw, jamsilver, Darren Oh: Fixed crash
 with reference to missing entity.

---
 uuid.entity.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/uuid.entity.inc b/uuid.entity.inc
index 4306339..97f7178 100644
--- a/uuid.entity.inc
+++ b/uuid.entity.inc
@@ -629,6 +629,10 @@ function entity_property_uuid_to_id(&$objects, $entity_type, $properties) {
     if (isset($ids[$value])) {
       $values[$i] = $ids[$value];
     }
+    // The UUID lookup failed, remove the item.
+    else {
+      $values[$i] = NULL;
+    }
   }
 }
 
-- 
2.8.4 (Apple Git-73)

