fixed crash on exit
using boolean to limit updating depth only when the stream is active.
Merge pull request #1 from quinkennedy/bUsingDepth

using boolean to limit updating depth only when the stream is active.