summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/taskbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/taskbar.cpp')
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 7f8d9ab86c..7e87787958 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -184,10 +184,8 @@ void CMsgDialog::VerifyProxy()
if (IsWinVer7Plus() && PluginConfig.m_useAeroPeek) {
if (nullptr == m_pWnd) {
m_pWnd = new CProxyWindow(this);
- if (m_pWnd) {
- m_pWnd->updateIcon(m_hTabStatusIcon);
- m_pWnd->updateTitle(m_cache->getNick());
- }
+ m_pWnd->updateIcon(m_hTabStatusIcon);
+ m_pWnd->updateTitle(m_cache->getNick());
}
else m_pWnd->verifyDwmState();
}
@@ -210,6 +208,9 @@ void CMsgDialog::VerifyProxy()
CProxyWindow::CProxyWindow(CMsgDialog *dat) :
m_dat(dat)
{
+ if (m_dat == nullptr)
+ DebugBreak();
+
m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, L"",
WS_POPUP | WS_BORDER | WS_SYSMENU | WS_CAPTION, -32000, -32000, 10, 10, nullptr, nullptr, g_plugin.getInst(), (LPVOID)this);
@@ -518,8 +519,9 @@ LRESULT CALLBACK CProxyWindow::wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
{
switch (msg) {
case WM_CLOSE:
- SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 2);
- {
+ if (m_dat) {
+ SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 2);
+
TContainerData *pC = m_dat->m_pContainer;
if (!IsIconic(pC->m_hwnd))
SetForegroundWindow(pC->m_hwnd);