Commit in reactos/lib/comctl32 on MAIN
status.c+4-21.7 -> 1.8
STATUSBAR_SetTextT:
-ntext wasn't freed on return if text was unicode
-part->text was allways freed, but if the previous style was SBT_OWNERDRAW, part->text would contain 32bit data (not a buffer ptr.)

reactos/lib/comctl32
status.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- status.c	5 Dec 2004 23:09:27 -0000	1.7
+++ status.c	14 Dec 2004 01:12:51 -0000	1.8
@@ -650,6 +650,7 @@
 {
     STATUSWINDOWPART *part=NULL;
     BOOL changed = FALSE;
+    WORD oldStyle;
 
     if (style & SBT_OWNERDRAW) {
          TRACE("part %d, text %p\n",nPart,text);
@@ -671,6 +672,7 @@
     if (part->style != style)
 	changed = TRUE;
 
+    oldStyle = part->style;
     part->style = style;
     if (style & SBT_OWNERDRAW) {
 	if (part->text == text)
@@ -694,7 +696,7 @@
 	/* check if text is unchanged -> no need to redraw */
 	if (text) {
 	    if (!changed && part->text && !lstrcmpW(ntext, part->text)) {
-		if (!isW) Free(ntext);
+		Free(ntext);
 		return TRUE;
 	    }
 	} else {
@@ -702,7 +704,7 @@
 		return TRUE;
 	}
 
-	if (part->text)
+	if (part->text && !(oldStyle & SBT_OWNERDRAW))
 	    Free (part->text);
 	part->text = ntext;
     }
CVSspam 0.2.8