diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-01 02:53:58 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-09-01 02:53:58 +0000 |
commit | 2a95f21a791420a0bd34c84a24c54f5a524ecccf (patch) | |
tree | d2f5a74b8dd92dc74eab68d00745f566a9442c9c /src | |
parent | 195a878170b6be418761f6f2dcaac426b294ebe8 (diff) | |
download | hercules-2a95f21a791420a0bd34c84a24c54f5a524ecccf.tar.gz hercules-2a95f21a791420a0bd34c84a24c54f5a524ecccf.tar.bz2 hercules-2a95f21a791420a0bd34c84a24c54f5a524ecccf.tar.xz hercules-2a95f21a791420a0bd34c84a24c54f5a524ecccf.zip |
Temporary workaround against the party/guild send_xy_timer dangling pointer crash that is somehow still possible (bugreport:2143).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13169 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/guild.c | 5 | ||||
-rw-r--r-- | src/map/party.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index b4f9c100f..ce75a0322 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -370,8 +370,9 @@ int guild_send_xy_timer_sub(DBKey key,void *data,va_list ap) nullpo_retr(0, g); for(i=0;i<g->max_member;i++){ - struct map_session_data *sd; - if((sd=g->member[i].sd)!=NULL){ + //struct map_session_data* sd = g->member[i].sd; + struct map_session_data* sd = map_charid2sd(g->member[i].char_id); // temporary crashfix + if( sd != NULL ) { if(sd->guild_x!=sd->bl.x || sd->guild_y!=sd->bl.y){ clif_guild_xy(sd); sd->guild_x=sd->bl.x; diff --git a/src/map/party.c b/src/map/party.c index b56d5e500..07ce7634d 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -753,7 +753,8 @@ int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data) // for each member of this party, for( i = 0; i < MAX_PARTY; i++ ) { - struct map_session_data* sd = p->data[i].sd; + //struct map_session_data* sd = p->data[i].sd; + struct map_session_data* sd = map_charid2sd(p->party.member[i].char_id); //temporary crashfix if( !sd ) continue; if( p->data[i].x != sd->bl.x || p->data[i].y != sd->bl.y ) |