summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-10-23 08:40:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-10-23 08:40:47 (GMT)
commit4430b6a1941111541c5adea2408b1b05bf7f6c14 (patch)
tree42990e6d325a4d25e0b03a0d4d8753f1a81d204f
parent4f139c1a29a68da77a6c97b643b302f098786978 (diff)
downloadtk-4430b6a1941111541c5adea2408b1b05bf7f6c14.zip
tk-4430b6a1941111541c5adea2408b1b05bf7f6c14.tar.gz
tk-4430b6a1941111541c5adea2408b1b05bf7f6c14.tar.bz2
Minor fixes to TkCursor.nextPtr field handling [adapted from Patch 473875]
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkCursor.c6
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 <fellowsd@cs.man.ac.uk>
+
+ * 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 <jeffh@ActiveState.com>
* 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");