diff options
| author | Zufu Liu <unknown> | 2019-11-16 08:05:28 +1100 | 
|---|---|---|
| committer | Zufu Liu <unknown> | 2019-11-16 08:05:28 +1100 | 
| commit | ae2b6f681ac630fa1fb0314294495b71cb1ac231 (patch) | |
| tree | 0e42f03e6dbc31726e653c5552eb21e06d5c5040 | |
| parent | 04e1669d6e6271b76955dce95bb19cac46ffe417 (diff) | |
| download | scintilla-mirror-ae2b6f681ac630fa1fb0314294495b71cb1ac231.tar.gz | |
Backport: Protect against use of null input context.
Backport of changeset 7764:322518a38ece.
| -rw-r--r-- | win32/ScintillaWin.cxx | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index ef2782fe7..d9b906c1f 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1434,7 +1434,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), | 
