If one chants the holy name of Hari and then dies because of an accidental misfortune, such as falling from the top of a house, slipping and suffering broken bones while traveling on the road, being bitten by a serpent, being afflicted with pain and high fever, or being injured by a weapon, one is immediately absolved from having to enter hellish life, even though he is sinful.
As stated in Bhagavad-gītā (8.6):
yaṁ yaṁ vāpi smaran bhāvaṁ
tyajaty ante kalevaram
taṁ tam evaiti kaunteya
“Whatever state of being one remembers when he quits his body, that state he will attain without fail.” If one practices chanting the Hare Kṛṣṇa mantra, he is naturally expected to chant Hare Kṛṣṇa when he meets with some accident. Even without such practice, however, if one somehow or other chants the holy name of the Lord (Hare Kṛṣṇa) when he meets with an accident and dies, he will be saved from hellish life after death.