Not sure if you've sorted the laptop side of this or not, but be aware that there are a number of things that could have caused your laptop to shut down unexpectedly. You may want to check that your battery is seated correctly, and if it wasn't on a solid surface, that could also be related e.g. if it flexed just a little and a connection was shorted, OR if you sat it near enough to something magnetic that it falsely detected a lid closure, or something of that nature. Heck, it could even be an issue where the battery was not able to maintain voltage to the motherboard due to a bad/failing cell within the battery.
All sorts of stuff could be at play there, but for the future it's worth just plugging your AC Adapter into the laptop anytime you're doing tuning, sort of like how you put the car on a battery charger/maintainer just for safety when tuning as well.