From 1fa41702b6c7b8b169a33b79125d3b24f23c2da8 Mon Sep 17 00:00:00 2001
From: Nikias Bassen
Date: Tue, 4 Oct 2016 14:37:57 +0200
Subject: idevicebackup2: Fix assertion occuring when copying non-present MEID

---
 tools/idevicebackup2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'tools')

diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 2c868d7..eb78b06 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -399,7 +399,8 @@ static plist_t mobilebackup_factory_info_plist_new(const char* udid, idevice_t d
 	plist_dict_set_item(ret, "Last Backup Date", plist_new_date(time(NULL) - MAC_EPOCH, 0));
 
 	value_node = plist_dict_get_item(root_node, "MobileEquipmentIdentifier");
-	plist_dict_set_item(ret, "MEID", plist_copy(value_node));
+	if (value_node)
+		plist_dict_set_item(ret, "MEID", plist_copy(value_node));
 
 	value_node = plist_dict_get_item(root_node, "PhoneNumber");
 	if (value_node && (plist_get_node_type(value_node) == PLIST_STRING)) {
-- 
cgit v1.1-32-gdbae