summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdfile/src/ftmanager.cpp12
-rw-r--r--src/modules/utils/resizer.cpp4
2 files changed, 11 insertions, 5 deletions
diff --git a/src/core/stdfile/src/ftmanager.cpp b/src/core/stdfile/src/ftmanager.cpp
index a361dd7a30..139ffbffbd 100644
--- a/src/core/stdfile/src/ftmanager.cpp
+++ b/src/core/stdfile/src/ftmanager.cpp
@@ -78,7 +78,8 @@ static void LayoutTransfers(HWND hwnd, struct TFtPageData *dat)
top -= dat->scrollPos;
for (int i = 0; i < dat->wnds->realCount; ++i) {
int height = dat->wnds->items[i]->rc.bottom - dat->wnds->items[i]->rc.top;
- hdwp = DeferWindowPos(hdwp, dat->wnds->items[i]->hwnd, NULL, 0, top, rc.right, height, SWP_NOZORDER);
+ if (NULL != dat->wnds->items[i]->hwnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->wnds->items[i]->hwnd, NULL, 0, top, rc.right, height, SWP_NOZORDER);
top += height;
}
top += dat->scrollPos;
@@ -313,7 +314,8 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
rc.bottom -= rcButton.bottom + 5;
- hdwp = DeferWindowPos(hdwp, hwndTab, NULL, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_NOZORDER);
+ if (NULL != hwndTab) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndTab, NULL, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_NOZORDER);
EndDeferWindowPos(hdwp);
@@ -324,8 +326,10 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
hdwp = BeginDeferWindowPos(2);
- hdwp = DeferWindowPos(hdwp, dat->hwndIncoming, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
- hdwp = DeferWindowPos(hdwp, dat->hwndOutgoing, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
+ if (NULL != dat->hwndIncoming) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->hwndIncoming, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
+ if (NULL != dat->hwndOutgoing) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->hwndOutgoing, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
EndDeferWindowPos(hdwp);
diff --git a/src/modules/utils/resizer.cpp b/src/modules/utils/resizer.cpp
index 7958664688..17f9e5bd34 100644
--- a/src/modules/utils/resizer.cpp
+++ b/src/modules/utils/resizer.cpp
@@ -149,7 +149,9 @@ INT_PTR ResizeDialog(WPARAM, LPARAM lParam)
urc.rcItem.top+=(urc.dlgNewSize.cy-urc.dlgOriginalSize.cy)/2;
urc.rcItem.bottom+=(urc.dlgNewSize.cy-urc.dlgOriginalSize.cy)/2;
}
- hDwp = DeferWindowPos(hDwp, GetDlgItem(urd->hwndDlg, extendedDlg?pItemEx->id:pItem->id), 0, urc.rcItem.left, urc.rcItem.top, urc.rcItem.right-urc.rcItem.left, urc.rcItem.bottom-urc.rcItem.top, SWP_NOZORDER);
+ HWND hCtrl = GetDlgItem(urd->hwndDlg, extendedDlg ? pItemEx->id : pItem->id);
+ if (NULL != hCtrl) /* Wine fix. */
+ hDwp = DeferWindowPos(hDwp, hCtrl, 0, urc.rcItem.left, urc.rcItem.top, urc.rcItem.right-urc.rcItem.left, urc.rcItem.bottom-urc.rcItem.top, SWP_NOZORDER);
}
EndDeferWindowPos(hDwp);
return 0;