From c4103afb49dde4cf1364b0b2661d8d1a2689e80c Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 1 Sep 2015 07:47:29 -0400 Subject: [PATCH] Some runtime error fixes. --- redo/windows/resize.c | 3 ++- redo/windows/window.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/redo/windows/resize.c b/redo/windows/resize.c index 95d54f87..fae9cc7e 100644 --- a/redo/windows/resize.c +++ b/redo/windows/resize.c @@ -21,7 +21,8 @@ void uiWindowsControlQueueRelayout(uiWindowsControl *c) uiWindowsControl *d; // resizing a control requires us to reocmpute the sizes of everything in the top-level window - c = uiWindowsControl(toplevelOwning(uiControl(c))); + // TODO use conversion + c = (uiWindowsControl *) toplevelOwning(uiControl(c)); if (c == NULL) return; // make sure we're only queued once diff --git a/redo/windows/window.c b/redo/windows/window.c index a828bb90..e3686048 100644 --- a/redo/windows/window.c +++ b/redo/windows/window.c @@ -29,7 +29,8 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA WINDOWPOS *wp = (WINDOWPOS *) lParam; LRESULT lResult; - w = uiWindow((void *) GetWindowLongPtrW(hwnd, GWLP_USERDATA)); + // TODO change to our conversion syntax + w = (uiWindow *) GetWindowLongPtrW(hwnd, GWLP_USERDATA); if (w == NULL) { if (uMsg == WM_CREATE) SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) (cs->lpCreateParams));