Avoid a "pure call" issue.

This commit is contained in:
Unknown W. Brackets committed 2013-09-15 10:36:19 -07:00
1 parent cfb50bf4d6
commit 2251b0dd59
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -8,11 +8,13 @@ Dialog::Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent)
m_hInstance = _hInstance;
m_hParent = _hParent;
m_hResource=res;
m_bValid = true;
Create();
}
Dialog::~Dialog()
{
m_bValid = false;
Destroy();
}
@@ -38,7 +40,7 @@ void Dialog::Show(bool _bShow)
INT_PTR Dialog::DlgProcStatic(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
Dialog *dis = (Dialog*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
if (dis)
if (dis && dis->m_bValid)
return dis->DlgProc(message,wParam,lParam);
else
{