aboutsummaryrefslogtreecommitdiff
path: root/c/listview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/listview.cpp')
-rw-r--r--c/listview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/c/listview.cpp b/c/listview.cpp
index 6c0185d..27dc7ac 100644
--- a/c/listview.cpp
+++ b/c/listview.cpp
@@ -21,6 +21,8 @@ ListView::ListView(const HWND hWndParent, const HMENU hMenu, const DWORD dwStyle
0, 0, 0, 0,
m_hWndParent, hMenu, GetModuleHandle(NULL), this
);
+ if (!hWnd) throw Win32Error(GetLastError());
+
if (SetProp(hWnd, TEXT("this"), (HANDLE)this))
m_prevProc = (WNDPROC)SetWindowLongPtr(hWnd,
GWLP_WNDPROC, (LONG_PTR)::WndProc);