Fix a null reference exception CID 18111