mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
init isDead to false. Fixes prolem where if DB entry's missing the
value is uninitialized and so device gets warned that other device resigned even if none did.
This commit is contained in:
parent
a69e2ad8be
commit
c36679fe13
1 changed files with 2 additions and 2 deletions
|
@ -682,7 +682,7 @@ SafeCref::SafeCref( const char* connName, const char* cookie, HostID hid,
|
|||
CookieRef* cref;
|
||||
assert( hid <= 4 ); /* no more than 4 hosts */
|
||||
|
||||
bool isDead;
|
||||
bool isDead = false;
|
||||
cref = m_mgr->getMakeCookieRef( connName, cookie, hid, socket, nPlayersH,
|
||||
nPlayersS, gameSeed, langCode,
|
||||
wantsPublic || makePublic, &isDead );
|
||||
|
@ -700,7 +700,7 @@ SafeCref::SafeCref( const char* const connName )
|
|||
, m_mgr( CRefMgr::Get() )
|
||||
, m_isValid( false )
|
||||
{
|
||||
bool isDead;
|
||||
bool isDead = false;
|
||||
CookieRef* cref = m_mgr->getMakeCookieRef( connName, &isDead );
|
||||
if ( cref != NULL ) {
|
||||
m_locked = cref->Lock();
|
||||
|
|
Loading…
Add table
Reference in a new issue