diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-01-01 18:50:37 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-01-01 17:52:36 +0000 |
commit | 72f035d0947ec2b752c47cb09c0272ba2e95fac2 (patch) | |
tree | 98b43d8257236a666d068070afc98f0e6eecc801 /ui | |
parent | 1663c2afe7e108134fdd51a8a768bc258a92b3a8 (diff) |
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>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window_preferences_frame.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/qt/main_window_preferences_frame.cpp b/ui/qt/main_window_preferences_frame.cpp index 6d77b77f8d..d7ef15668d 100644 --- a/ui/qt/main_window_preferences_frame.cpp +++ b/ui/qt/main_window_preferences_frame.cpp @@ -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()); } /* |