- this collection can be None on cleanup, so check for that

This commit is contained in:
Mike Bayer
2013-07-27 18:41:34 -04:00
parent 20b7c03729
commit effad0a4e3
+1 -1
View File
@@ -41,7 +41,7 @@ ref(listenercollection) -> {
def _collection_gced(ref):
# defaultdict, so can't get a KeyError
if ref not in _collection_to_key:
if not _collection_to_key or ref not in _collection_to_key:
return
listener_to_key = _collection_to_key.pop(ref)
for key in listener_to_key.values():