summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-05-25 23:50:00 (GMT)
committerhobbs <hobbs>2006-05-25 23:50:00 (GMT)
commitebb151d964a0d293113369b111cd8c26c4edf905 (patch)
tree91323d5c348a1447294c6f2755123a7bb1026473
parent4811a984259426f03b9f06428812143165137bac (diff)
downloadtk-ebb151d964a0d293113369b111cd8c26c4edf905.zip
tk-ebb151d964a0d293113369b111cd8c26c4edf905.tar.gz
tk-ebb151d964a0d293113369b111cd8c26c4edf905.tar.bz2
* generic/tkMessage.c (MessageWidgetObjCmd): Correct msgPtr
preserve/release pairing. [Bug 1485750] (afredd)
-rw-r--r--generic/tkMessage.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index eb4974d..aeb09f4 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMessage.c,v 1.15 2005/11/14 22:44:11 dkf Exp $
+ * RCS: @(#) $Id: tkMessage.c,v 1.16 2006/05/25 23:50:00 hobbs Exp $
*/
#include "tkPort.h"
@@ -330,15 +330,16 @@ MessageWidgetObjCmd(
case MESSAGE_CGET:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "option");
- return TCL_ERROR;
- }
- objPtr = Tk_GetOptionValue(interp, (char *) msgPtr,
- msgPtr->optionTable, objv[2], msgPtr->tkwin);
- if (objPtr == NULL) {
result = TCL_ERROR;
} else {
- Tcl_SetObjResult(interp, objPtr);
- result = TCL_OK;
+ objPtr = Tk_GetOptionValue(interp, (char *) msgPtr,
+ msgPtr->optionTable, objv[2], msgPtr->tkwin);
+ if (objPtr == NULL) {
+ result = TCL_ERROR;
+ } else {
+ Tcl_SetObjResult(interp, objPtr);
+ result = TCL_OK;
+ }
}
break;
case MESSAGE_CONFIGURE: