Tk Source Code

Check-in [1304e06d]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In Aqua, protect against double release of clipping regions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 1304e06d4f2f3f250d1f3e15b3f07dd1f9b99d275d3437b29a720979ac4cf766
User & Date: culler 2019-05-17 12:38:12
Context
2019-05-17
13:42
Migrate away from TCL_INTERP_DESTROYED (TIP 543). check-in: 1c5f7e98 user: dgp tags: core-8-6-branch
12:39
In Aqua, protect against double release of clipping regions. check-in: d0ddc7ca user: culler tags: trunk
12:38
In Aqua, protect against double release of clipping regions. check-in: 1304e06d user: culler tags: core-8-6-branch
07:21
Add missing INT2PTR (doesn't cause warning with Tcl8.x, but does with Tcl 9.0). One None -> NULL change which was still missing. Backported from trunk. check-in: 777211ed user: jan.nijtmans tags: core-8-6-branch
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXSubwindows.c.

    68     68       if (!Tk_IsTopLevel(macWin->winPtr)) {
    69     69   	TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW);
    70     70   	if (macWin->winPtr->parentPtr != NULL) {
    71     71   	    TkMacOSXInvalClipRgns((Tk_Window) macWin->winPtr->parentPtr);
    72     72   	}
    73     73   	if (macWin->visRgn) {
    74     74   	    CFRelease(macWin->visRgn);
           75  +            macWin->visRgn = NULL;
    75     76   	}
    76     77   	if (macWin->aboveVisRgn) {
    77     78   	    CFRelease(macWin->aboveVisRgn);
           79  +            macWin->aboveVisRgn = NULL;
    78     80   	}
    79     81   	if (macWin->drawRgn) {
    80     82   	    CFRelease(macWin->drawRgn);
           83  +            macWin->drawRgn = NULL;
    81     84   	}
    82     85   
    83     86   	if (macWin->toplevel->referenceCount == 0) {
    84     87   	    ckfree(macWin->toplevel);
    85     88   	}
    86     89   	ckfree(macWin);
    87     90   	return;
    88     91       }
    89     92       if (macWin->visRgn) {
    90     93   	CFRelease(macWin->visRgn);
           94  +        macWin->visRgn = NULL;
    91     95       }
    92     96       if (macWin->aboveVisRgn) {
    93     97   	CFRelease(macWin->aboveVisRgn);
           98  +        macWin->aboveVisRgn = NULL;
    94     99       }
    95    100       if (macWin->drawRgn) {
    96    101   	CFRelease(macWin->drawRgn);
          102  +        macWin->drawRgn = NULL;
    97    103       }
    98    104       macWin->view = nil;
    99    105   
   100    106       /*
   101    107        * Delay deletion of a toplevel data structure untill all children have
   102    108        * been deleted.
   103    109        */