GTK: Fix an invalid memory access in the joypad config dialog

This commit is contained in:
bgk 2012-10-03 17:18:17 +00:00
parent ba2dad5e93
commit b1ddfdd553
1 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ void JoypadConfigDialog::vUpdateEntries()
for (guint i = 0; i < m_oEntries.size(); i++)
{
const char * csName = 0;
std::string csName;
guint uiKeyval = inputGetKeymap(m_ePad, m_astKeys[i].m_eKeyFlag);
int dev = uiKeyval >> 16;
@ -158,10 +158,10 @@ void JoypadConfigDialog::vUpdateEntries()
}
}
csName = os.str().c_str();
csName = os.str();
}
if (csName == 0)
if (csName.empty())
{
m_oEntries[i]->set_text(_("<Undefined>"));
}