From b1ddfdd5532931f0b745eb102433578625a404dd Mon Sep 17 00:00:00 2001 From: bgk Date: Wed, 3 Oct 2012 17:18:17 +0000 Subject: [PATCH] GTK: Fix an invalid memory access in the joypad config dialog --- src/gtk/joypadconfig.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gtk/joypadconfig.cpp b/src/gtk/joypadconfig.cpp index 3a009d11..383cb910 100644 --- a/src/gtk/joypadconfig.cpp +++ b/src/gtk/joypadconfig.cpp @@ -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(_("")); }