I can't duplicate this now in r385 (tried with Slave Band, Shackles of the Mundane, Ritual of Domination) and the affected code hasn't been changed since then. Are you sure it's not something else causing the crash?
Also, can you provide a save file in which it seems to consistently happen with a specific girl?
Okay, I've done a lot of tests and followed a bunch of false leads, so apparently it's either more or less complicated than I thought. The "LS" attachment below is a save game with one girl, on a fresh install, everything default. I start the program, load the game, go to town, to the shop, then get her, say, Fairy Dust, Lace Lingerie or a Leash, and the game crashes, always. It might not be entirely related to the badness stat, because I can get her, say, a Brothel Gown and get away with it; however all the items I've seen cause a crash so far have had a non-zero badness.
The same thing happens when I start a new game, basically; this isn't just that specific save. However, "Test" brothels work fine and don't crash. If I start the program, load the "Test" game attached below, then go to the shop, I can buy the girl any item I want without problems.