When testing my project, if another user leaves the application crashes.
I have:

"On Channel Leave
THEN (sets flag to objects related to the ID of peer that left)

Those flagged items are deleted. Shortly after the peer leaves, the program crashes.

Any ideas?

I've tried manually setting the flag on the items also - to make sure the deletion itself is not causing the problems.
It's only when a peer actually leaves for real that it causes issues.

EDIT:

I've solved the issue - one of the lines that was sending was to "peer" rather than to channel and this caused the crash.

(I'm still learning this thing but getting there!)