summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImage.c')
-rw-r--r--generic/tkImage.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 31ac3bb..2ebb5de 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.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: tkImage.c,v 1.7 2000/05/15 18:21:47 ericm Exp $
+ * RCS: @(#) $Id: tkImage.c,v 1.8 2000/11/23 13:50:11 dkf Exp $
*/
#include "tkInt.h"
@@ -232,6 +232,18 @@ Tk_ImageObjCmd(clientData, interp, objc, objv)
sprintf(idString, "image%d", dispPtr->imageId);
name = idString;
firstOption = 3;
+ } else if (arg[0] == '.') {
+ /*
+ * It is a really bad idea to create an image with the
+ * same name as the root window, and who knows what
+ * will happen if any other (potential) window name is
+ * used. So it's prohibited for safety, so stopping
+ * bug #120819
+ */
+ Tcl_AppendResult(interp, "image names cannot start with "
+ "period symbols: \"", arg, "\" is illegal",
+ (char *)NULL);
+ return TCL_ERROR;
} else {
name = arg;
firstOption = 4;