The code has nullptr checks to make sure it doesn't try to use freed or unitiallized variables. However the when freeing the data, the code doesn't assign the pointer to be null. Now set them to be null Pull Request: https://projects.blender.org/blender/blender/pulls/125090