riched20: If outside of the richedit window, return earlier.
Prevents a crash when selecting text outside of a richedit control box.
This commit is contained in:
parent
34e74ffc2a
commit
2aa8463a94
|
@ -2597,6 +2597,8 @@ void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
x = (short)LOWORD(lParam);
|
||||
y = (short)HIWORD(lParam);
|
||||
nCharOfs = ME_CharFromPos(editor, x, y);
|
||||
if (nCharOfs < 0) return;
|
||||
|
||||
ME_CursorFromCharOfs(editor, nCharOfs, &tmpCursor);
|
||||
tmpRun = &tmpCursor.pRun->member.run;
|
||||
|
||||
|
|
Loading…
Reference in New Issue