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:
Andy2 2010-11-15 18:21:40 -08:00
parent a69e2ad8be
commit c36679fe13

View file

@ -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();