Fix a possible crash caused by a dangling pointer