Overview
| Artifact ID: | 32a81e798d313f8c6b5e0c28e5ce409570ca2de6 |
|---|---|
| Ticket: | 482100ffffffffffffffffffffffffffffffffff
Mac OS X Tk 8-4-a4-1 |
| User & Date: | wolfsuit on 2002-01-22 08:11:31 |
Changes
- icomment:
Logged In: YES user_id=169107 This is caused by doing: button .b -text "" pack .b The problem was that we were grabbing the first text layout of the button string (the Aqua button CDEF really didn't like buttons with newlines in the text). But we didn't handle the case where the text was a null string. The patch is: Index: tkFont.c =========================================== ======================== RCS file: /cvsroot/tktoolkit/tk/generic/tkFont.c,v retrieving revision 1.12.2.1 diff -p -r1.12.2.1 tkFont.c *** tkFont.c 2001/10/15 09:22:00 1.12.2.1 --- tkFont.c 2002/01/22 01:09:04 *************** Tk_GetFirstTextLayout( *** 3697,3706 **** int numDisplayChars; layoutPtr = (TextLayout *)layout; ! if (layoutPtr==NULL) { ! return 0; ! } ! if (layoutPtr->numChunks==0) { return 0; } chunkPtr = layoutPtr->chunks; --- 3697,3706 ---- int numDisplayChars; layoutPtr = (TextLayout *)layout; ! if ((layoutPtr==NULL) ! || (layoutPtr->numChunks==0) ! || (layoutPtr->chunks->numDisplayChars <= 0)) { ! dst[0] = '\0'; return 0; } chunkPtr = layoutPtr->chunks; I checked this in. - login: "wolfsuit"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "wolfsuit"