Check if a pointer is not null before dereferencing it.

Channel may not have attached stream. In this case footprint equals 0.
Merge pull request #53 from andrusha97/master

Check if a pointer is not null before dereferencing it.