Skip to content

Commit

Permalink
Synchronize changes from 1.6 master branch [ci skip]
Browse files Browse the repository at this point in the history
0b6908b breakpad: Fix build error on glibc > 2.33
d431e5e Fix assert when model info is missing (Fixes #3192, PR #3194)
  • Loading branch information
github-actions[bot] committed Sep 25, 2023
2 parents f8c75e3 + 0b6908b commit 783d7f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions Client/game_sa/CModelInfoSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,18 @@ void CModelInfoSA::ResetTextureDictionaryID()

void CModelInfoSA::StaticResetTextureDictionaries()
{
while (!ms_DefaultTxdIDMap.empty()) {
while (!ms_DefaultTxdIDMap.empty())
{
const auto mi = pGame->GetModelInfo(ms_DefaultTxdIDMap.begin()->first);
assert(mi);
mi->ResetTextureDictionaryID();
if (mi)
{
mi->ResetTextureDictionaryID();
}
else
{
// Model was deallocated. Skip and remove it from our list.
ms_DefaultTxdIDMap.erase(ms_DefaultTxdIDMap.begin());
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
// SIGSTKSZ may be too small to prevent the signal handlers from overrunning
// the alternative stack. Ensure that the size of the alternative stack is
// large enough.
static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);

// Only set an alternative stack if there isn't already one, or if the current
// one is too small.
Expand Down

0 comments on commit 783d7f0

Please sign in to comment.