From bd7e8df6ba2d7984043ad9aaf50e966d05395ff2 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Tue, 27 Nov 2012 14:31:46 -0600 Subject: [PATCH] user32: More instances where early versions of usp10 are not well behaved with ScriptString_pSize being NULL. Issue discovered by Qian Hong. --- dlls/user32/edit.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index f5d4e65f775..c143aa61f05 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -640,7 +640,9 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta current_line->net_length = prev; EDIT_InvalidateUniscribeData_linedef(current_line); EDIT_UpdateUniscribeData_linedef(es, NULL, current_line); - sz = ScriptString_pSize(current_line->ssa); + if (current_line->ssa) + sz = ScriptString_pSize(current_line->ssa); + else sz = 0; if (sz) current_line->width = sz->cx; else @@ -697,8 +699,13 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta if (current_line->net_length > 0) { EDIT_UpdateUniscribeData_linedef(es, NULL, current_line); - sz = ScriptString_pSize(current_line->ssa); - current_line->width = sz->cx; + if (current_line->ssa) + { + sz = ScriptString_pSize(current_line->ssa); + current_line->width = sz->cx; + } + else + current_line->width = 0; } else current_line->width = 0; } -- 2.11.4.GIT