Check for m_pNetwork being not null in several more places
Check for m_pNetwork being not null in several more places

I don't know whether these are crasheable, but now they will definitely
be not.

znc/znc,znc/znc,znc/znc,znc/znc,znc/znc,znc/znc