If I have an event receiver that handles the item added event, it fires whenever the list is modified. While debugging the event we see that it is firing over a non-existim item (
I have been handling this with the following one-liner:
if (properties.ListItem == null) return;
However, I feel that I am not getting the whole picture, and that I may end up causing more problems for not handling this correctly.
Is there a reason the item added event fires when the list is modified? Is there a better way to handle this, or to prevent this event from firing in this situation?
Edit: the change I am making to the list is adding a field programmatically during feature activation.