Applied patch [ 1192914 ] Null pointers in wxSocketBase / wxDatagramSocket
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a1b2d8d9b9
commit
11734f8af6
@ -1154,6 +1154,8 @@ bool wxSocketServer::WaitForAccept(long seconds, long milliseconds)
|
||||
|
||||
bool wxSocketBase::GetOption(int level, int optname, void *optval, int *optlen)
|
||||
{
|
||||
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
|
||||
|
||||
if (m_socket->GetSockOpt(level, optname, optval, optlen)
|
||||
!= GSOCK_NOERROR)
|
||||
{
|
||||
@ -1165,6 +1167,8 @@ bool wxSocketBase::GetOption(int level, int optname, void *optval, int *optlen)
|
||||
bool wxSocketBase::SetOption(int level, int optname, const void *optval,
|
||||
int optlen)
|
||||
{
|
||||
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
|
||||
|
||||
if (m_socket->SetSockOpt(level, optname, optval, optlen)
|
||||
!= GSOCK_NOERROR)
|
||||
{
|
||||
@ -1304,6 +1308,8 @@ wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
|
||||
const void* buf,
|
||||
wxUint32 nBytes )
|
||||
{
|
||||
wxASSERT_MSG( m_socket, _T("Socket not initialised") );
|
||||
|
||||
m_socket->SetPeer(addr.GetAddress());
|
||||
Write(buf, nBytes);
|
||||
return (*this);
|
||||
|
Loading…
Reference in New Issue
Block a user