From fd28e7e285dcf212a8f0cdee2003c2107bb257c7 Mon Sep 17 00:00:00 2001 From: shashclp Date: Fri, 28 Mar 2008 15:59:19 +0000 Subject: [PATCH] - Fixes that Dmitry Krutskih sent me per mail a zillion months ago --- desmume/src/windows/lightView.c | 2 +- desmume/src/windows/matrixView.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/windows/lightView.c b/desmume/src/windows/lightView.c index eb9b20603..3c1f49c31 100644 --- a/desmume/src/windows/lightView.c +++ b/desmume/src/windows/lightView.c @@ -41,8 +41,8 @@ BOOL LightView_OnClose(lightview_struct* win) { win->window.autoup = FALSE; CWindow_RemoveFromRefreshList(win); - LightView_Deinit(win); EndDialog(win->window.hwnd, 0); + LightView_Deinit(win); return TRUE; } diff --git a/desmume/src/windows/matrixView.c b/desmume/src/windows/matrixView.c index c5dfb9c5a..2bc9b1b55 100644 --- a/desmume/src/windows/matrixView.c +++ b/desmume/src/windows/matrixView.c @@ -74,8 +74,8 @@ BOOL MatrixView_OnClose(matrixview_struct* win) { win->window.autoup = FALSE; CWindow_RemoveFromRefreshList(win); - MatrixView_Deinit(win); EndDialog(win->window.hwnd, 0); + MatrixView_Deinit(win); return TRUE; } @@ -238,7 +238,7 @@ matrixview_struct *MatrixView_Init(HINSTANCE hInst, HWND parent) if ((MatrixView = (matrixview_struct *)malloc(sizeof(matrixview_struct))) == NULL) return NULL; - if (CWindow_Init2(MatrixView, hInst, parent, "Matrix viewer", IDD_MATRIX_VIEWER, MatrixView_Proc) != 0) + if (CWindow_Init2(&MatrixView->window, hInst, parent, "Matrix viewer", IDD_MATRIX_VIEWER, MatrixView_Proc) != 0) { free(MatrixView); return NULL;