Commit 62d80cff authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

riched20: Fix a use after free.

In ME_DestroyEditor(), the item list is being freed when calling get_total_width() in destroy_para(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46328Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d3ca7db4
......@@ -3183,13 +3183,13 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
void ME_DestroyEditor(ME_TextEditor *editor)
{
ME_DisplayItem *pFirst = editor->pBuffer->pFirst;
ME_DisplayItem *p = pFirst, *pNext = NULL;
ME_DisplayItem *p = editor->pBuffer->pFirst, *pNext = NULL;
ME_Style *s, *cursor2;
int i;
ME_ClearTempStyle(editor);
ME_EmptyUndoStack(editor);
editor->pBuffer->pFirst = NULL;
while(p) {
pNext = p->next;
if (p->type == diParagraph)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment