--- trunk/reactos/lib/comctl32/status.c 2005-01-21 14:52:53 UTC (rev 13186)
+++ trunk/reactos/lib/comctl32/status.c 2005-01-21 16:50:11 UTC (rev 13187)
@@ -650,7 +650,7 @@
{
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 @@
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;