Try to fix a rare crash

This commit is contained in:
Benau 2019-10-11 22:44:08 +08:00
parent f56cf03b6a
commit ed376d329c

View File

@ -427,7 +427,7 @@ namespace Online
OnlineProfile::RelationInfo * relation_info =
profile->getRelationInfo();
if (relation_info->isOnline())
if (relation_info && relation_info->isOnline())
{
if (!now_online) // the friend went offline
{
@ -435,7 +435,7 @@ namespace Online
went_offline = true;
}
}
else
else if (relation_info)
{
if (now_online) // friend came online
{