Fix a bunch of crashes in the vector clip tool