summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c
index ee56f140f..99f585a8d 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1657,7 +1657,8 @@ int map_quit(struct map_session_data *sd) {
}
/* two times, the npc event above may assign a new one or delete others */
for( i = 0; i < sd->queues_count; i++ ) {
- script->queue_remove(sd->queues[i],sd->status.account_id);
+ if( sd->queues[i] != -1 )
+ script->queue_remove(sd->queues[i],sd->status.account_id);
}
npc_script_event(sd, NPCE_LOGOUT);