There was an attempt to access a field or function of a null reference.
Correct the code to not use a null reference.