Your description is of the ammo exploding. Cartridges that are not chambered will not fire their bullet, but the case will become shrapnel at detonation.ammo doesn't explode - even when fired from the gun. No reason to pull out because ammo is burning. The fireworks are much more dangerous. Ammo burns really hot, but that's all. When the powder in loaded ammo catches, the brass blows apart but since it weighs a fraction of what the bullet weighs, the case moves, not the bullet.
Saw a bolt action rifle that went through a fire while loaded. The round in the chamber went through several walls and lodged in a brick exterior wall. The rounds in the magazine blew the bottom off the magazine. The bullets were still in the mag but the brass cases looked like twisted aluminum foil.