threading: Assert before a possible null-ptr dereference
I was trying to debug a non-deterministic crash related to network
profile switch and aborted seacrh/thread, but I failed at that. However,
this assert looks like a good thing to do.
Change-Id: I809469f356d801c2d1e3b5d4b8a390244b854f10