Yes it is. Most people would prefer a computer to shut down rather than to burn down.
I am not sure what you mean by "I put it on a fan". But if that does not allow the laptop to get rid of it's internal heat it will still shut down.
A laptop can get hotter when on the power adapter. Try and use it on battery alone to see if it will stay on longer.