Ben Jass wrote:After so and so user action, we come to this call:
So given the code you posted, at this point
sock is null. You haven't posted the code which would persuade us that can't happen, and in the code you posted it can happen.
However I notice that your Networking constructor is calling a public method to do the rest of its initialization. I'm assuming you still aren't showing us an
SSCCE, so let me just mention that calling public methods from a constructor can backfire if you write a subclass which overrides that public method. Things which you expected to be initialized are surprisingly not initialized, for example. Perhaps that's what you really did? An SSCCE would be helpful not only to us but to you as well.