diff options
author | nyamatongwe <unknown> | 2003-04-06 00:34:30 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-04-06 00:34:30 +0000 |
commit | 5770440e3b61dbb9b9b8d704435b4d9540bfafd6 (patch) | |
tree | 25cedabbc792f0f2be918369c4e39f7473052700 | |
parent | d533f4848830d2c85b2e81e5a66d83db1f9f32f0 (diff) | |
download | scintilla-mirror-5770440e3b61dbb9b9b8d704435b4d9540bfafd6.tar.gz |
Avoid calling API before Window created.
-rw-r--r-- | win32/PlatWin.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index d2b88bda3..3f4dffc41 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -781,8 +781,9 @@ void Window::SetPositionRelative(PRectangle rc, Window w) { } PRectangle Window::GetClientPosition() { - RECT rc; - ::GetClientRect(reinterpret_cast<HWND>(id), &rc); + RECT rc={0,0,0,0}; + if (id) + ::GetClientRect(reinterpret_cast<HWND>(id), &rc); return PRectangle(rc.left, rc.top, rc.right, rc.bottom); } |