[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

@ -466,12 +466,12 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
GetWindowRect(hCtrl, &rect);
point.x = rect.left;
point.y = rect.top;
ScreenToClient((hDlg==hMainDialog)?hDlg:NULL, &point);
ScreenToClient(hDlg, &point);
GetClientRect(hCtrl, &rect);
// If we're dealing with a dialog, we must take the border into account
if (hCtrl == hDlg)
border = GetBorderSize(hDlg);
if ((hCtrl == hDlg) || (hDlg == NULL))
border = GetBorderSize(hCtrl);
MoveWindow(hCtrl, point.x + (int)(fScale*(float)dx), point.y + (int)(fScale*(float)dy),
(rect.right - rect.left) + (int)(fScale*(float)dw + border.cx),
(rect.bottom - rect.top) + border.cy, TRUE);