From af13357d827091e757f070c107784da2d6397bc4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 31 Oct 2013 21:25:00 +0000 Subject: Fix refcount bug in FreeFontObjProc. Could result in freeing a TkFont which was already freed. --- generic/tkFont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tkFont.c b/generic/tkFont.c index 1a6474f..9eaaf94 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -1522,8 +1522,8 @@ FreeFontObjProc( fontPtr->objRefCount--; if ((fontPtr->resourceRefCount == 0) && (fontPtr->objRefCount == 0)) { ckfree((char *) fontPtr); - objPtr->internalRep.twoPtrValue.ptr1 = NULL; } + objPtr->internalRep.twoPtrValue.ptr1 = NULL; } } -- cgit v0.12