mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Fix crash when loading Strife dialog with latest Clang compiler and optimisation on
This commit is contained in:
parent
beeb5f00aa
commit
3bedf79222
1 changed files with 2 additions and 2 deletions
|
@ -345,7 +345,7 @@ FStrifeDialogueNode *MapLoader::ReadRetailNode (const char *name, FileReader &lu
|
||||||
for (j = 0; j < 3; ++j)
|
for (j = 0; j < 3; ++j)
|
||||||
{
|
{
|
||||||
auto inv = GetStrifeType(speech.ItemCheck[j]);
|
auto inv = GetStrifeType(speech.ItemCheck[j]);
|
||||||
if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
|
if (inv == NULL || !inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
|
||||||
node->ItemCheck[j].Item = inv;
|
node->ItemCheck[j].Item = inv;
|
||||||
node->ItemCheck[j].Amount = -1;
|
node->ItemCheck[j].Amount = -1;
|
||||||
}
|
}
|
||||||
|
@ -516,7 +516,7 @@ void MapLoader::ParseReplies (const char *name, int pos, FStrifeDialogueReply **
|
||||||
for (k = 0; k < 3; ++k)
|
for (k = 0; k < 3; ++k)
|
||||||
{
|
{
|
||||||
auto inv = GetStrifeType(rsp->Item[k]);
|
auto inv = GetStrifeType(rsp->Item[k]);
|
||||||
if (!inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
|
if (inv == NULL || !inv->IsDescendantOf(NAME_Inventory)) inv = nullptr;
|
||||||
reply->ItemCheck[k].Item = inv;
|
reply->ItemCheck[k].Item = inv;
|
||||||
reply->ItemCheck[k].Amount = rsp->Count[k];
|
reply->ItemCheck[k].Amount = rsp->Count[k];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue