Rule 1: always save game right before getting into a fight. If something goes wrong, e.g. you lose the fight or the game crashes after you win the fight, you can try again. If it happens consistently then rethink your strategy (if you keep losing) or call here for help (if it keeps crashing). There are occasional random crashes and that could have been one of them, because I've done pretty much exactly the same as you and got away with it several times. Well, not quite exactly the same. If I'm only putting an officer aboard to keep the ship until I can sell it, I'm not too bothered about the warning about Leadership / Sailing skill because a commander with inadequate skills can still command that ship, just not very well. But then, with a minimal crew, he's not going to play much part in the battle anyway, so all you need him to do is keep out of trouble while you deal with the rest of the enemy ships.
There was a bug whereby, if you looted chests or bodies during boarding, the game was liable to crash. It wouldn't wait till the end of the boarding, though; if it didn't crash while you were still walking around the deck where you'd done the looting, it probably did it on the next deck, or it wouldn't crash at all during this battle. But it seems to have been fixed because apart from the occasional random crash that can happen at any time, I haven't had problems with boarding under the current version of the game, and I loot everything in sight.
If the game does crash routinely, try deleting the "options" file which you'll find at the top level of the game installation folder. When you run the game again, you'll need to use the "Options" screen at game start to put back all your choices, e.g. game preferences, controls etc. The "options" file sometimes gets corrupted, causing all sorts of weirdness, which means deleting "options" can cure all sorts of weirdness.