Fixed potential SEGFAULT.
Merge remote-tracking branch 'upstream/master'
Merge pull request #922 from horus42/master

Fixed potential SEGFAULT in socket_base.cpp