Fix a potential crash when closing projects with html composer items