mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-26 09:58:20 +01:00
Fix crash going from connected to standalone game: don't invoke sockrw
code when its "self" is null.
This commit is contained in:
parent
5fa3e2209c
commit
63fc1e048a
2 changed files with 8 additions and 2 deletions
|
@ -2716,11 +2716,16 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||
case XWWM_HOSTNAME_ARRIVED:
|
||||
ce_sockwrap_hostname( globals->socketWrap, wParam, lParam );
|
||||
/* drop it if we're standalone now */
|
||||
if ( !!globals->socketWrap ) {
|
||||
ce_sockwrap_hostname( globals->socketWrap, wParam, lParam );
|
||||
}
|
||||
break;
|
||||
|
||||
case XWWM_SOCKET_EVT:
|
||||
draw = ce_sockwrap_event( globals->socketWrap, wParam, lParam );
|
||||
if ( !!globals->socketWrap ) {
|
||||
draw = ce_sockwrap_event( globals->socketWrap, wParam, lParam );
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -307,6 +307,7 @@ ce_sockwrap_hostname( CeSocketWrapper* self, WPARAM XP_UNUSED_DBG(wParam),
|
|||
LPARAM lParam )
|
||||
{
|
||||
LOG_FUNC();
|
||||
XP_ASSERT( !!self );
|
||||
DWORD err = WSAGETASYNCERROR( lParam );
|
||||
|
||||
XP_ASSERT( CE_IPST_RESOLVINGHOST == self->connState );
|
||||
|
|
Loading…
Reference in a new issue