dll/win32/riched20/txthost.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dll/win32/riched20/txthost.c b/dll/win32/riched20/txthost.c index 4b9dde834a3..a3e9a2885b1 100644 --- a/dll/win32/riched20/txthost.c +++ b/dll/win32/riched20/txthost.c @@ -1457,6 +1457,11 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, WCHAR *text = (WCHAR *)lparam; int len; +#ifdef __REACTOS__ + if (!lparam || !*text || !*textA) + return 0; +#endif + if (!unicode && textA && strncmp( textA, "{\\rtf", 5 ) && strncmp( textA, "{\\urtf", 6 )) text = ME_ToUnicode( CP_ACP, textA, &len ); hr = ITextServices_TxSendMessage( host->text_srv, msg, wparam, (LPARAM)text, &res );