summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp3
-rw-r--r--plugins/Scriver/src/utils.cpp9
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index e40d7cf57d..a1e9dd0ec7 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -540,7 +540,8 @@ static void MessageDialogResize(HWND hwndDlg, SrmmWindowData *dat, int w, int h)
logH = h - hSplitterPos - toolbarHeight - infobarInnerHeight;
HDWP hdwp = BeginDeferWindowPos(15);
- hdwp = DeferWindowPos(hdwp, dat->infobarData->hWnd, 0, 1, 0, w - 2, infobarInnerHeight - 2, SWP_NOZORDER);
+ if (NULL != dat->infobarData->hWnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->infobarData->hWnd, 0, 1, 0, w - 2, infobarInnerHeight - 2, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_LOG), 0, 1, logY, w - 2, logH, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 1, h - hSplitterPos + SPLITTER_HEIGHT, messageEditWidth, hSplitterPos - SPLITTER_HEIGHT - 1, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_AVATAR), 0, w - avatarWidth - 1, h - (avatarHeight + avatarWidth) / 2 - 1, avatarWidth, avatarWidth, SWP_NOZORDER);
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 0ecbad553b..ec5c25b5e3 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -497,20 +497,25 @@ void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT* rect)
HDWP ResizeToolbar(HWND hwnd, HDWP hdwp, int width, int vPos, int height, int cControls, const ToolbarButton * buttons, int controlVisibility)
{
+ HWND hCtrl;
int i;
int lPos = 0;
int rPos = width;
for (i = 0; i < cControls; i++) {
if (!buttons[i].alignment && (controlVisibility & (1 << i))) {
lPos += buttons[i].spacing;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
lPos += buttons[i].width;
}
}
for (i = cControls - 1; i >= 0; i--) {
if (buttons[i].alignment && (controlVisibility & (1 << i))) {
rPos -= buttons[i].spacing + buttons[i].width;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
}
}
return hdwp;