summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-25 08:46:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-25 08:46:21 (GMT)
commit98977bf15d83c275acd088ed86f9aba41a46f9cf (patch)
tree3d2c81b1c8c0d80719e20425409b331116ab9c88 /generic
parent6f21d7296a145b331e08a1d287f9ee577e86b696 (diff)
parent332a310b88f7e2df121be42967755bc600f2c1b2 (diff)
downloadtk-98977bf15d83c275acd088ed86f9aba41a46f9cf.zip
tk-98977bf15d83c275acd088ed86f9aba41a46f9cf.tar.gz
tk-98977bf15d83c275acd088ed86f9aba41a46f9cf.tar.bz2
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkTreeview.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 1a300d2..2fc70c3 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -4049,7 +4049,7 @@ static int TreeviewCtagHasCommand(
} else if (objc == 6) { /* Test if cell has specified tag */
Ttk_Tag tag = Ttk_GetTagFromObj(tv->tree.tagTable, objv[4]);
int result = 0;
- if (GetCellFromObj(interp, tv, objv[4], 0, NULL, &cell) != TCL_OK) {
+ if (GetCellFromObj(interp, tv, objv[5], 0, NULL, &cell) != TCL_OK) {
return TCL_ERROR;
}
if (cell.column == &tv->tree.column0) {
@@ -4058,8 +4058,11 @@ static int TreeviewCtagHasCommand(
columnNumber = cell.column - tv->tree.columns + 1;
}
if (columnNumber < cell.item->nTagSets) {
- result = Ttk_TagSetContains(cell.item->cellTagSets[columnNumber],
- tag);
+ if (cell.item->cellTagSets[columnNumber] != NULL) {
+ result = Ttk_TagSetContains(
+ cell.item->cellTagSets[columnNumber],
+ tag);
+ }
}
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result));