summaryrefslogtreecommitdiffstats
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)
commit0e9db7c160616a0c10b8b97ea991d70b0fa34a9e (patch)
treeb3ce71f642d6b87437656c8332de064bcf2ec1fe
parent5a69a6ae109ece6ba215d24e3b0d0f1c8671a1dd (diff)
downloadtk-0e9db7c160616a0c10b8b97ea991d70b0fa34a9e.zip
tk-0e9db7c160616a0c10b8b97ea991d70b0fa34a9e.tar.gz
tk-0e9db7c160616a0c10b8b97ea991d70b0fa34a9e.tar.bz2
More correct error handling when calling paneconfigure with a non existing window
-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,