aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-11-16 08:05:28 +1100
committerZufu Liu <unknown>2019-11-16 08:05:28 +1100
commit1b4fa798daa2d6a33256257f0481f650f7d76e01 (patch)
treeb360a68334a6ae20b6094de72792a61b70d9a60d
parent8fca4d7b901ad3fdcd984d491019aaaeeed720cd (diff)
downloadscintilla-mirror-1b4fa798daa2d6a33256257f0481f650f7d76e01.tar.gz
Protect against use of null input context.
-rw-r--r--win32/ScintillaWin.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 6524ada5a..ff20740f8 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1427,7 +1427,9 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
case WM_LBUTTONDOWN: {
// For IME, set the composition string as the result string.
IMContext imc(MainHWND());
- ::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
+ if (imc.hIMC) {
+ ::ImmNotifyIME(imc.hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
+ }
//
//Platform::DebugPrintf("Buttdown %d %x %x %x %x %x\n",iMessage, wParam, lParam,
// KeyboardIsKeyDown(VK_SHIFT),