Skip to content

Commit

Permalink
Resolved instance destruction causing a map crash (fixes #1309)
Browse files Browse the repository at this point in the history
* Follow up to 32c829d.
  • Loading branch information
aleos89 committed May 26, 2016
1 parent 161a4c0 commit f91bf02
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/map/instance.c
Expand Up @@ -556,6 +556,19 @@ int instance_destroy(unsigned short instance_id)
return 1;

mode = im->mode;
switch(mode) {
case IM_NONE:
break;
case IM_CHAR:
sd = map_id2sd(im->owner_id);
break;
case IM_PARTY:
p = party_search(im->owner_id);
break;
case IM_GUILD:
g = guild_search(im->owner_id);
break;
}

if(im->state == INSTANCE_IDLE) {
for(i = 0; i < instance_wait.count; i++) {
Expand Down

0 comments on commit f91bf02

Please sign in to comment.