summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-10-31 21:25:49 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-10-31 21:25:49 (GMT)
commitd7a026f3ddc47931e8898977f8815bb7a2406563 (patch)
tree555abebafcee76ed9fec5cbf33b71c86ac02b4cc
parent89fd6b4597e32b2987741e784185fef55dcbf9bc (diff)
parentd3d04191b830aea6d815cf52802d34324f885a47 (diff)
downloadtk-d7a026f3ddc47931e8898977f8815bb7a2406563.zip
tk-d7a026f3ddc47931e8898977f8815bb7a2406563.tar.gz
tk-d7a026f3ddc47931e8898977f8815bb7a2406563.tar.bz2
Fix refcount bug in FreeFontObjProc. Could result in freeing a TkFont which was already freed.
-rw-r--r--generic/tkFont.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 4485df8..ad009b9 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -1517,8 +1517,8 @@ FreeFontObj(
fontPtr->objRefCount--;
if ((fontPtr->resourceRefCount == 0) && (fontPtr->objRefCount == 0)) {
ckfree(fontPtr);
- objPtr->internalRep.twoPtrValue.ptr1 = NULL;
}
+ objPtr->internalRep.twoPtrValue.ptr1 = NULL;
}
}