Obviously, one should not be expected to take all possible measures to prevent a crime that could happen against them. Also, it is clear that this doesn't question or influence the guilty of the criminal itself.
Let me give you an example. Suppose i parked my car and let the windows open. We could even make it extreme, saying that i also let the keys inside it.
My question is: to what extent may i be considered guilty, deserving or even dumb if someone steals my car?
Stealing is a crime, and it is not (i think) any less of a crime because there were appropriate conditions for it to happen. But what about me? How guilty am i?
I would also like to make an analogy with a well-known point made by feminism: some people say using short or sensual clothes is somewhat an invitation to rape, and so that kind of behaviour should be avoided. Some go even further, saying that a woman who dresses "inappropriately" deserve to be raped. I strongly disagree with that: people should be free to chose what they want to wear, without being "punished" for that choice.
However, it not possible to negate the fact that there is a set of behaviours that could prevent rape, or make it less likely to happen. One of these is the dressing style.
I think both cases may or should be analysed using the same moral laws, as they appear inherently similar. If that's the case, it seems to me that we only have two morally coherent options: to leave the crime prevention entirely to the state, and act as totally free people (which would make things like locking the door to your home morally wrong, since the problem would really be the crime, not your action), or to take part in the crime prevention and sacrifice a bit of our freedom.