summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-07-16 13:03:38 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-07-16 13:03:38 (GMT)
commitc0213377420fc585acd517b8a519901101aba1db (patch)
tree0b37fadefbfa5b6dab42779182d388a5d52a98b2 /xlib
parent32e85c199e36f68c80a08a50c6610a3990c54499 (diff)
downloadtk-c0213377420fc585acd517b8a519901101aba1db.zip
tk-c0213377420fc585acd517b8a519901101aba1db.tar.gz
tk-c0213377420fc585acd517b8a519901101aba1db.tar.bz2
Bug [f9eddb541a] (TkSetRegion(), XSetClipRectangles): Patch 3 from Christopher Chavez - Stylistic adjustment to FreeClipMask() to make the next change clearer.
Diffstat (limited to 'xlib')
-rw-r--r--xlib/xgc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlib/xgc.c b/xlib/xgc.c
index 1f13406..8d8b6dc 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -72,10 +72,12 @@ static TkpClipMask *AllocClipMask(GC gc) {
*/
static void FreeClipMask(GC gc) {
- if (gc->clip_mask != None) {
- ckfree((char *)gc->clip_mask);
- gc->clip_mask = None;
+ TkpClipMask * clip_mask = (TkpClipMask*)gc->clip_mask;
+ if (clip_mask == NULL) {
+ return;
}
+ ckfree(clip_mask);
+ gc->clip_mask = None;
}
/*