From 27c9d50d1d53135b0b4a3f3b7c63ccfd0052fd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 21 Jan 2005 16:50:11 +0000 Subject: [PATCH] Merge back commit from winehq svn path=/trunk/; revision=13187 --- reactos/lib/comctl32/status.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/lib/comctl32/status.c b/reactos/lib/comctl32/status.c index 068564651ef..4ee0b9c44fd 100644 --- a/reactos/lib/comctl32/status.c +++ b/reactos/lib/comctl32/status.c @@ -650,7 +650,7 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, { STATUSWINDOWPART *part=NULL; BOOL changed = FALSE; - WORD oldStyle; + INT oldStyle; if (style & SBT_OWNERDRAW) { TRACE("part %d, text %p\n",nPart,text); @@ -675,9 +675,12 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, oldStyle = part->style; part->style = style; if (style & SBT_OWNERDRAW) { - if (part->text == text) - return TRUE; - part->text = (LPWSTR)text; + if (!(oldStyle & SBT_OWNERDRAW)) { + if (part->text) + Free (part->text); + } else if (part->text == text) + return TRUE; + part->text = (LPWSTR)text; } else { LPWSTR ntext;