From 4430b6a1941111541c5adea2408b1b05bf7f6c14 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 23 Oct 2001 08:40:47 +0000 Subject: Minor fixes to TkCursor.nextPtr field handling [adapted from Patch 473875] --- ChangeLog | 6 ++++++ generic/tkCursor.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d625a44..07a7216 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-10-23 Donal K. Fellows + + * generic/tkCursor.c (Tk_GetCursorFromData): Fixed uninit nextPtr + field. [adapted from Patch 473875] + (GetCursor): Removed double-assignment to nextPtr field. + 2001-10-19 Jeff Hobbs * library/console.tcl: removed transpose ability until the console diff --git a/generic/tkCursor.c b/generic/tkCursor.c index ee2663e..89c40ae 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCursor.c,v 1.7 2001/08/15 15:44:36 dkf Exp $ + * RCS: @(#) $Id: tkCursor.c,v 1.8 2001/10/23 08:40:47 dkf Exp $ */ #include "tkPort.h" @@ -276,13 +276,12 @@ GetCursor(interp, tkwin, string) cursorPtr->objRefCount = 0; cursorPtr->otherTable = &dispPtr->cursorNameTable; cursorPtr->hashPtr = nameHashPtr; - cursorPtr->nextPtr = NULL; + cursorPtr->nextPtr = existingCursorPtr; cursorPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorIdTable, (char *) cursorPtr->cursor, &new); if (!new) { panic("cursor already registered in Tk_GetCursor"); } - cursorPtr->nextPtr = existingCursorPtr; Tcl_SetHashValue(nameHashPtr, cursorPtr); Tcl_SetHashValue(cursorPtr->idHashPtr, cursorPtr); @@ -384,6 +383,7 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height, cursorPtr->objRefCount = 0; cursorPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorIdTable, (char *) cursorPtr->cursor, &new); + cursorPtr->nextPtr = NULL; if (!new) { panic("cursor already registered in Tk_GetCursorFromData"); -- cgit v0.12