1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-26 17:15:24 +00:00

Merge pull request #1122 from gucio321/panic-fix

fix panic while loading wrong version of game.
This commit is contained in:
Tim Sarbin 2021-05-10 15:00:09 -04:00 committed by GitHub
commit c5a8a8601a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,8 @@
package d2records
import (
"log"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2txt"
)
@ -125,6 +127,10 @@ func updateEquivalencies(
itemType *ItemTypeRecord,
checked []string,
) {
if itemType == nil {
log.Fatal("invalid data file. Please ensure, you're using the newest patch_d2.mpq file!")
}
if itemType.Code == "" {
return
}