Automatic overheating protective device