summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkTreeview.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkTreeview.c')
-rw-r--r--generic/ttk/ttkTreeview.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 58ff7f0..fca8aa7 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,4 +1,4 @@
-/* $Id: ttkTreeview.c,v 1.23.2.3 2010/09/08 17:57:52 jenglish Exp $
+/* $Id: ttkTreeview.c,v 1.23.2.4 2010/10/11 21:35:27 jenglish Exp $
* Copyright (c) 2004, Joe English
*
* ttk::treeview widget implementation.
@@ -3140,7 +3140,7 @@ static int TreeviewTagNamesCommand(
static void AddTag(TreeItem *item, Ttk_Tag tag)
{
if (Ttk_TagSetAdd(item->tagset, tag)) {
- Tcl_DecrRefCount(item->tagsObj);
+ if (item->tagsObj) Tcl_DecrRefCount(item->tagsObj);
item->tagsObj = Ttk_NewTagSetObj(item->tagset);
Tcl_IncrRefCount(item->tagsObj);
}
@@ -3173,12 +3173,12 @@ static int TreeviewTagAddCommand(
return TCL_OK;
}
-/* + $tv tag remove $tag $items
+/* + $tv tag remove $tag ?$items?
*/
static void RemoveTag(TreeItem *item, Ttk_Tag tag)
{
if (Ttk_TagSetRemove(item->tagset, tag)) {
- Tcl_DecrRefCount(item->tagsObj);
+ if (item->tagsObj) Tcl_DecrRefCount(item->tagsObj);
item->tagsObj = Ttk_NewTagSetObj(item->tagset);
Tcl_IncrRefCount(item->tagsObj);
}