I experienced a similar error with one of my cock tanks, but I wasn't trying to delete a unit. After he captured a witch, he was attacked and defeated by a marionette during his H-scene with the witch which caused an error. It sounds like it happens when an H-scene is interrupted by an enemy unit, or the player.