From 94ceb4479a0ee5d6510fddfdf6625ed726836ba2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 9 May 2003 10:15:13 +0000 Subject: Fixed problem when missing reverse arrow cursor resource meant cursor disappeared over margin. --- win32/PlatWin.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 472c8b9a2..291d40fd9 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -839,7 +839,11 @@ void Window::SetCursor(Cursor curs) { hinstPlatformRes = ::GetModuleHandle("SciLexer"); if (!hinstPlatformRes) hinstPlatformRes = ::GetModuleHandle(NULL); - ::SetCursor(::LoadCursor(hinstPlatformRes, MAKEINTRESOURCE(IDC_MARGIN))); + HCURSOR hcursor = ::LoadCursor(hinstPlatformRes, MAKEINTRESOURCE(IDC_MARGIN)); + if (hcursor) + ::SetCursor(hcursor); + else + ::SetCursor(::LoadCursor(NULL,IDC_ARROW)); } break; case cursorArrow: -- cgit v1.2.3