Only return valid data for alive threads.

This commit is contained in:
Marc-Andre Ferland 2022-10-30 01:38:32 -04:00
parent eb994716e6
commit c687091ce9

View File

@ -356,7 +356,11 @@ def get_devices():
try:
device_dict = {}
for rthread in render_threads:
if not rthread.is_alive():
continue
weak_data = weak_thread_data.get(rthread)
if not weak_data or not 'device' in weak_data or not 'device_name' in weak_data:
continue
device_dict.update({weak_data['device']:weak_data['device_name']})
return device_dict
finally: