summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1999-04-17 01:39:05 (GMT)
committerrjohnson <rjohnson>1999-04-17 01:39:05 (GMT)
commitf918ed3b3397df68218337d79016a5851ea4be69 (patch)
tree1bbce058d812aaf5e90fce2ce2a4cb7b54a608f4 /generic/tkCanvas.c
parentf32c746a2ae0694c9f8e7e3090f9325a04d252e6 (diff)
downloadtk-f918ed3b3397df68218337d79016a5851ea4be69.zip
tk-f918ed3b3397df68218337d79016a5851ea4be69.tar.gz
tk-f918ed3b3397df68218337d79016a5851ea4be69.tar.bz2
Fixed bug 1840
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c10
1 files changed, 6 insertions, 4 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;