Tk Source Code

Check-in [1304e06d]
Login

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
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.817
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
Unified Diff Ignore Whitespace Patch
Changes to macosx/tkMacOSXSubwindows.c.
68
69
70
71
72
73
74

75
76
77

78
79
80

81
82
83
84
85
86
87
88
89
90

91
92
93

94
95
96

97
98
99
100
101
102
103
    if (!Tk_IsTopLevel(macWin->winPtr)) {
	TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW);
	if (macWin->winPtr->parentPtr != NULL) {
	    TkMacOSXInvalClipRgns((Tk_Window) macWin->winPtr->parentPtr);
	}
	if (macWin->visRgn) {
	    CFRelease(macWin->visRgn);

	}
	if (macWin->aboveVisRgn) {
	    CFRelease(macWin->aboveVisRgn);

	}
	if (macWin->drawRgn) {
	    CFRelease(macWin->drawRgn);

	}

	if (macWin->toplevel->referenceCount == 0) {
	    ckfree(macWin->toplevel);
	}
	ckfree(macWin);
	return;
    }
    if (macWin->visRgn) {
	CFRelease(macWin->visRgn);

    }
    if (macWin->aboveVisRgn) {
	CFRelease(macWin->aboveVisRgn);

    }
    if (macWin->drawRgn) {
	CFRelease(macWin->drawRgn);

    }
    macWin->view = nil;

    /*
     * Delay deletion of a toplevel data structure untill all children have
     * been deleted.
     */







>



>



>










>



>



>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    if (!Tk_IsTopLevel(macWin->winPtr)) {
	TkMacOSXInvalidateWindow(macWin, TK_PARENT_WINDOW);
	if (macWin->winPtr->parentPtr != NULL) {
	    TkMacOSXInvalClipRgns((Tk_Window) macWin->winPtr->parentPtr);
	}
	if (macWin->visRgn) {
	    CFRelease(macWin->visRgn);
            macWin->visRgn = NULL;
	}
	if (macWin->aboveVisRgn) {
	    CFRelease(macWin->aboveVisRgn);
            macWin->aboveVisRgn = NULL;
	}
	if (macWin->drawRgn) {
	    CFRelease(macWin->drawRgn);
            macWin->drawRgn = NULL;
	}

	if (macWin->toplevel->referenceCount == 0) {
	    ckfree(macWin->toplevel);
	}
	ckfree(macWin);
	return;
    }
    if (macWin->visRgn) {
	CFRelease(macWin->visRgn);
        macWin->visRgn = NULL;
    }
    if (macWin->aboveVisRgn) {
	CFRelease(macWin->aboveVisRgn);
        macWin->aboveVisRgn = NULL;
    }
    if (macWin->drawRgn) {
	CFRelease(macWin->drawRgn);
        macWin->drawRgn = NULL;
    }
    macWin->view = nil;

    /*
     * Delay deletion of a toplevel data structure untill all children have
     * been deleted.
     */