diff --git a/src/online/online_player_profile.cpp b/src/online/online_player_profile.cpp index a1f9b227e..efc58da98 100644 --- a/src/online/online_player_profile.cpp +++ b/src/online/online_player_profile.cpp @@ -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 {