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:
Jason Green 2007-02-14 23:40:52 -05:00 committed by Alexandre Julliard
parent 34e74ffc2a
commit 2aa8463a94

View file

@ -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;