Hmm. Is this vanilla, or with mods?
Looking at the vanilla code, this crash seems .. well, I'd say "impossible" but I know better. But basically, the game is crashing because a certain variable - a pirate base commander - is null. But in vanilla code for 0.97a, it's guaranteed to be set by the time this code is called, and nothing in vanilla sets it again. The only possibility that comes to mind is if something goes very badly wrong when the savegame is loaded, but that also seems rather unlikely, so I'm a bit stumped!
IF this is vanilla, could you email me your save so I can take a look?
fractalsoftworks [at] gmail [dot] com