do not memcpy from NULL
diff --git a/Modules/hashtable.c b/Modules/hashtable.c
index 133f313..fdddc19 100644
--- a/Modules/hashtable.c
+++ b/Modules/hashtable.c
@@ -327,7 +327,8 @@
     entry->key_hash = key_hash;
 
     assert(data_size == ht->data_size);
-    memcpy(_Py_HASHTABLE_ENTRY_DATA(entry), data, data_size);
+    if (data)
+        memcpy(_Py_HASHTABLE_ENTRY_DATA(entry), data, data_size);
 
     _Py_slist_prepend(&ht->buckets[index], (_Py_slist_item_t*)entry);
     ht->entries++;