summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-09 19:20:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-09 19:20:28 +0000
commita922acb1ec3a1ccb666cd180d3278ff38120796c (patch)
tree8ab226c04a6054ab98ee18ae32a861ddbb163d8f /src
parent26e2ecdf63af2a92909183bbcccbec98f8a1cbdb (diff)
downloadhercules-a922acb1ec3a1ccb666cd180d3278ff38120796c.tar.gz
hercules-a922acb1ec3a1ccb666cd180d3278ff38120796c.tar.bz2
hercules-a922acb1ec3a1ccb666cd180d3278ff38120796c.tar.xz
hercules-a922acb1ec3a1ccb666cd180d3278ff38120796c.zip
Fixed a mistake in r13051 party invite code where 'tsd' was accessed before checking for NULL.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13058 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/party.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 0de52d5c8..e24acdf6a 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -285,8 +285,12 @@ int party_invite(struct map_session_data *sd,struct map_session_data *tsd)
int i,flag=0;
nullpo_retr(0, sd);
- if (p==NULL)
+ 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)