[loc] fix a crash on exit

* Don't free loc_filename if it points to embedded name
* Also fix resizing of main dialog
This commit is contained in:
Pete Batard 2013-10-17 20:42:03 +01:00
parent ff28e2027c
commit 4e840a6995
3 changed files with 12 additions and 9 deletions

View file

@ -131,7 +131,8 @@ void init_localization(void) {
void exit_localization(void) {
free_dialog_list();
free_locale_list();
safe_free(loc_filename);
if (loc_filename != embedded_loc_filename)
safe_free(loc_filename);
}
/*
@ -240,6 +241,8 @@ void apply_localization(int dlg_id, HWND hDlg)
continue;
}
hCtrl = hDlg;
if (dlg_id == IDD_DIALOG)
hDlg = NULL;
} else {
hCtrl = GetDlgItem(hDlg, lcmd->ctrl_id);
}