summaryrefslogtreecommitdiffstats
path: root/generic/tkPanedWindow.c
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2015-05-24 23:11:56 (GMT)
committerfvogelnew1@free.fr <fvogel>2015-05-24 23:11:56 (GMT)
commitf6a10fb9c41d1dc23d0c24285a062e9643883d2c (patch)
tree5deae2fa1d75180f313b46dacd8b68c8516a26f3 /generic/tkPanedWindow.c
parentfc2586d0f5c1507a804f39764200216cc6ac4875 (diff)
downloadtk-f6a10fb9c41d1dc23d0c24285a062e9643883d2c.zip
tk-f6a10fb9c41d1dc23d0c24285a062e9643883d2c.tar.gz
tk-f6a10fb9c41d1dc23d0c24285a062e9643883d2c.tar.bz2
More correct error handling when calling paneconfigure with a non existing window
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r--generic/tkPanedWindow.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 3ae473a..c79be25 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -678,6 +678,15 @@ PanedWindowWidgetObjCmd(
if (objc <= 4) {
tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]),
pwPtr->tkwin);
+ if (tkwin == NULL) {
+ /*
+ * Just a plain old bad window; Tk_NameToWindow filled in an
+ * error message for us.
+ */
+
+ result = TCL_ERROR;
+ break;
+ }
for (i = 0; i < pwPtr->numSlaves; i++) {
if (pwPtr->slaves[i]->tkwin == tkwin) {
resultObj = Tk_GetOptionInfo(interp,