From f918ed3b3397df68218337d79016a5851ea4be69 Mon Sep 17 00:00:00 2001 From: rjohnson Date: Sat, 17 Apr 1999 01:39:05 +0000 Subject: Fixed bug 1840 --- generic/tkCanvas.c | 10 ++++++---- generic/tkScale.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 2ec336d..63af945 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -7,12 +7,12 @@ * * Copyright (c) 1991-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. + * Copyright (c) 1998-1999 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.4 1999/04/16 01:51:12 stanton Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.5 1999/04/17 01:39:05 rjohnson Exp $ */ #include "default.h" @@ -2539,8 +2539,10 @@ FindItems(interp, canvasPtr, argc, argv, newTag, cmdName, option) return TCL_ERROR; } itemPtr = StartTagSearch(canvasPtr, argv[1], &search); - if (itemPtr->prevPtr != NULL) { - DoItem(interp, itemPtr->prevPtr, uid); + if (itemPtr != NULL) { + if (itemPtr->prevPtr != NULL) { + DoItem(interp, itemPtr->prevPtr, uid); + } } } else if ((c == 'c') && (strncmp(argv[0], "closest", length) == 0)) { double closestDist; diff --git a/generic/tkScale.c b/generic/tkScale.c index 74efdd8..6d23cf3 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkScale.c,v 1.3 1999/04/16 01:51:21 stanton Exp $ + * RCS: @(#) $Id: tkScale.c,v 1.4 1999/04/17 01:39:06 rjohnson Exp $ */ #include "tkPort.h" @@ -272,7 +272,7 @@ Tk_ScaleObjCmd(clientData, interp, objc, objv) scalePtr->fromValue = 0.0; scalePtr->toValue = 0.0; scalePtr->tickInterval = 0.0; - scalePtr->resolution = 1; + scalePtr->resolution = 1.0; scalePtr->digits = 0; scalePtr->bigIncrement = 0.0; scalePtr->commandPtr = NULL; -- cgit v0.12