Resolves a map crash from an equipment lookup (#5935)

* Fixes #5933.
* Follow up to 82ff520.
Thanks to @mazvi!
This commit is contained in:
Aleos 2021-05-12 11:26:23 -04:00 committed by GitHub
parent c44fdaf76e
commit 202945ab37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12637,7 +12637,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
break;
}
if (current_equip_combo_pos && tick == INFINITE_TICK) {
if (sd && current_equip_combo_pos > 0 && tick == INFINITE_TICK) {
ShowWarning("sc_start: Item combo of item #%u contains an INFINITE_TICK duration. Skipping bonus.\n", sd->inventory_data[pc_checkequip(sd, current_equip_combo_pos)]->nameid);
return 0;
}