summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-12-14 17:29:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-12-14 17:29:11 (GMT)
commit2873fa937d4219f949acd8eb3a9ab8a4596714f2 (patch)
treecb1b17d6107e32f791fd8f2b2781022fc4835e2f /generic
parent9d5ab8c0763ef4bc7c012f964d622201c0c1899f (diff)
parentc6496bf3c66241288028b50e8fddd98442a2ddab (diff)
downloadtk-2873fa937d4219f949acd8eb3a9ab8a4596714f2.zip
tk-2873fa937d4219f949acd8eb3a9ab8a4596714f2.tar.gz
tk-2873fa937d4219f949acd8eb3a9ab8a4596714f2.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCmds.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 448a207..d7f0e8c 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -815,13 +815,6 @@ ScalingCmd(
int skip, width, height;
double d;
- if (Tcl_IsSafe(interp)) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "scaling not accessible in a safe interpreter", -1));
- Tcl_SetErrorCode(interp, "TK", "SAFE", "SCALING", NULL);
- return TCL_ERROR;
- }
-
skip = TkGetDisplayOf(interp, objc - 1, objv + 1, &tkwin);
if (skip < 0) {
return TCL_ERROR;
@@ -832,6 +825,11 @@ ScalingCmd(
d *= WidthOfScreen(screenPtr);
d /= WidthMMOfScreen(screenPtr);
Tcl_SetObjResult(interp, Tcl_NewDoubleObj(d));
+ } else if (Tcl_IsSafe(interp)) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "setting the scaling not accessible in a safe interpreter", -1));
+ Tcl_SetErrorCode(interp, "TK", "SAFE", "SCALING", NULL);
+ return TCL_ERROR;
} else if (objc - skip == 2) {
if (Tcl_GetDoubleFromObj(interp, objv[1+skip], &d) != TCL_OK) {
return TCL_ERROR;