diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-11 16:13:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-11 16:13:29 (GMT) |
commit | f264c7b17d4d054ae24e9aade070e07b403a8f6d (patch) | |
tree | 5a0b1f28f72d60cab65d6d72cc05e963a2b71728 /generic/tkButton.c | |
parent | a8b0abe63a5f3a8ec798808c44a2decc3208e495 (diff) | |
parent | 3ad9d246512cd5fe480647ab23c4f96d39ca705c (diff) | |
download | tk-f264c7b17d4d054ae24e9aade070e07b403a8f6d.zip tk-f264c7b17d4d054ae24e9aade070e07b403a8f6d.tar.gz tk-f264c7b17d4d054ae24e9aade070e07b403a8f6d.tar.bz2 |
butPtr->wrapLengthObj et al cannot be NULL (since the TK_OPTION_NULL_OK flag is not set)
Diffstat (limited to 'generic/tkButton.c')
-rw-r--r-- | generic/tkButton.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index b640a5d..5520bc7 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -1099,41 +1099,31 @@ ConfigureButton( } if (butPtr->wrapLength < 0) { butPtr->wrapLength = 0; - if (butPtr->wrapLengthObj) { - Tcl_DecrRefCount(butPtr->wrapLengthObj); - } + Tcl_DecrRefCount(butPtr->wrapLengthObj); butPtr->wrapLengthObj = Tcl_NewIntObj(0); Tcl_IncrRefCount(butPtr->wrapLengthObj); } if (butPtr->borderWidth < 0) { butPtr->borderWidth = 0; - if (butPtr->borderWidthObj) { - Tcl_DecrRefCount(butPtr->borderWidthObj); - } + Tcl_DecrRefCount(butPtr->borderWidthObj); butPtr->borderWidthObj = Tcl_NewIntObj(0); Tcl_IncrRefCount(butPtr->borderWidthObj); } if (butPtr->highlightWidth < 0) { butPtr->highlightWidth = 0; - if (butPtr->highlightWidthObj) { - Tcl_DecrRefCount(butPtr->highlightWidthObj); - } + Tcl_DecrRefCount(butPtr->highlightWidthObj); butPtr->highlightWidthObj = Tcl_NewIntObj(0); Tcl_IncrRefCount(butPtr->highlightWidthObj); } if (butPtr->padX < 0) { butPtr->padX = 0; - if (butPtr->padXObj) { - Tcl_DecrRefCount(butPtr->padXObj); - } + Tcl_DecrRefCount(butPtr->padXObj); butPtr->padXObj = Tcl_NewIntObj(0); Tcl_IncrRefCount(butPtr->padXObj); } if (butPtr->padY < 0) { butPtr->padY = 0; - if (butPtr->padYObj) { - Tcl_DecrRefCount(butPtr->padYObj); - } + Tcl_DecrRefCount(butPtr->padYObj); butPtr->padYObj = Tcl_NewIntObj(0); Tcl_IncrRefCount(butPtr->padYObj); } |