Qt: fix crash when opening Preferences window on Windows

Do not use delete on g_allocated memory

Change-Id: I84e0adc65c45520916adb9b2f6d46ca3f144486e
Reviewed-on: https://code.wireshark.org/review/6207
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2015-01-01 18:50:37 +01:00
parent 1663c2afe7
commit 72f035d094
1 changed files with 2 additions and 2 deletions

View File

@ -229,9 +229,9 @@ void MainWindowPreferencesFrame::on_mainToolbarComboBox_currentIndexChanged(int
void MainWindowPreferencesFrame::on_languageComboBox_currentIndexChanged(int index)
{
if (language)
delete language;
g_free(language);
language = strdup(ui->languageComboBox->itemData(index).toString().toStdString().c_str());
language = g_strdup(ui->languageComboBox->itemData(index).toString().toStdString().c_str());
}
/*