Fix bug caused by compiler optimization

The 'private' server icon did not load in release builds due to the call to 'LoadTextureBuffer' getting optimized away by the use of the const qualifier. Removing the qualifier fixed the bug.
This commit is contained in:
Kawe Mazidjatari 2023-04-16 00:40:44 +02:00
parent 3d49d07953
commit 617b7b1948

View File

@ -390,7 +390,7 @@ void CBrowser::HiddenServersModal(void)
if (!m_idLockedIcon) // !TODO: Fall-back texture.
{
const bool ret = LoadTextureBuffer(reinterpret_cast<unsigned char*>(m_rLockedIconBlob.m_pData), int(m_rLockedIconBlob.m_nSize),
bool ret = LoadTextureBuffer(reinterpret_cast<unsigned char*>(m_rLockedIconBlob.m_pData), int(m_rLockedIconBlob.m_nSize),
&m_idLockedIcon, &m_rLockedIconBlob.m_nWidth, &m_rLockedIconBlob.m_nHeight);
IM_ASSERT(ret);
NOTE_UNUSED(ret);