From 831ad8a0121f9f9ee5c4f38d4a0d209b3c2bdb60 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 16 Jan 2014 21:40:14 +0000 Subject: kernel chats, part 3, tabsrmm git-svn-id: http://svn.miranda-ng.org/main/trunk@7684 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/Version.h | 4 ++-- plugins/Scriver/src/msgwindow.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/Version.h b/plugins/Scriver/src/Version.h index 061117ee47..406bbd5d7f 100644 --- a/plugins/Scriver/src/Version.h +++ b/plugins/Scriver/src/Version.h @@ -1,6 +1,6 @@ #define __MAJOR_VERSION 2 -#define __MINOR_VERSION 10 -#define __RELEASE_NUM 1 +#define __MINOR_VERSION 11 +#define __RELEASE_NUM 0 #define __BUILD_NUM 0 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index b791a24541..18706d3c9b 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -828,13 +828,14 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case WM_DESTROY: { char szSettingName[64]; - for (int i=dat->childrenCount; --i >= 0;) { + for (int i = dat->childrenCount; i >= 0; i--) { TCITEM tci; tci.mask = TCIF_PARAM | TCIF_IMAGE; - TabCtrl_GetItem(dat->hwndTabs, i, &tci); - TabCtrl_DeleteItem(dat->hwndTabs, i); - mir_free((MessageWindowTabData *) tci.lParam); - ReleaseIcon(tci.iImage); + if (TabCtrl_GetItem(dat->hwndTabs, i, &tci)) { + mir_free((MessageWindowTabData *)tci.lParam); + ReleaseIcon(tci.iImage); + TabCtrl_DeleteItem(dat->hwndTabs, i); + } } SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0); WindowList_Remove(g_dat.hParentWindowList, hwndDlg); -- cgit v1.2.3