Fix for possible crash in TryFindBeads

"SBead* beads" is deallocated even if it's a nullptr (i.e. if error
happened before memory allocation or memory allocation failed).
Merge pull request #9 from evmarkov/master

Fix for possible crash in TryFindBeads