summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-10 22:31:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-10 22:31:27 +0300
commit7de2c65b3c6ab68a7981b4c65fc7b31f5a05cdd5 (patch)
treebab5e8118690a6ca5396a4cbe0e42c1cbe6c1f14 /plugins
parentd89ae362ba46d8885f0980e2af3bf142598c2d90 (diff)
fixes #1118 ([HistoryStats] Pressing "Apply" after modifying any settings causes a miranda crash)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp
index 4ecbe3932d..129668d1f5 100644
--- a/plugins/HistoryStats/src/bandctrlimpl.cpp
+++ b/plugins/HistoryStats/src/bandctrlimpl.cpp
@@ -46,10 +46,13 @@ LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam,
return 0;
case WM_GETFONT:
- return reinterpret_cast<LRESULT>(pCtrl->m_hFont);
+ if (pCtrl)
+ return reinterpret_cast<LRESULT>(pCtrl->m_hFont);
+ break;
case WM_SETFONT:
- pCtrl->m_hFont = reinterpret_cast<HFONT>(wParam);
+ if (pCtrl)
+ pCtrl->m_hFont = reinterpret_cast<HFONT>(wParam);
return 0;
case WM_WINDOWPOSCHANGED:
@@ -132,7 +135,8 @@ LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam,
return BOOL_(pCtrl->m_Items[wParam - 1].bVisible);
case BCM_SHOWBUTTON:
- pCtrl->onBCMShowButton(wParam - 1, bool_(lParam));
+ if (pCtrl)
+ pCtrl->onBCMShowButton(wParam - 1, bool_(lParam));
return 0;
case BCM_SETLAYOUT: