Fixed a mistake in r13051 party invite code where 'tsd' was accessed before checking for NULL.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13058 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
0a47c29967
commit
d6228b8460
@ -287,6 +287,10 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
|
||||
nullpo_retr(0, sd);
|
||||
if( p == NULL )
|
||||
return 0;
|
||||
if( tsd == NULL) { //TODO: Find the correct reply packet.
|
||||
clif_displaymessage(sd->fd, msg_txt(3));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( (pc_isGM(sd) && !pc_isGM(tsd) && !battle_config.gm_can_party && pc_isGM(sd) < battle_config.gm_cant_party_max_lv)
|
||||
|| ( !pc_isGM(sd) && pc_isGM(tsd) && !battle_config.gm_can_party ) )
|
||||
@ -297,10 +301,6 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(tsd==NULL) { //TODO: Find the correct reply packet.
|
||||
clif_displaymessage(sd->fd, msg_txt(3));
|
||||
return 0;
|
||||
}
|
||||
//Only leader can invite.
|
||||
ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd);
|
||||
if (i == MAX_PARTY || !p->party.member[i].leader)
|
||||
|
Loading…
x
Reference in New Issue
Block a user