summaryrefslogtreecommitdiffstats
path: root/generic/tkTreeUtils.c
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-10-28 01:21:51 (GMT)
committertreectrl <treectrl>2006-10-28 01:21:51 (GMT)
commit5b6b792cd49d65536ee282ebeaac850ac64f12f9 (patch)
tree864cfc6d2c29caf01177aea532b26ac4c525ce42 /generic/tkTreeUtils.c
parentbab5d282bc445d4872e17a430a75c78254fff02b (diff)
downloadtktreectrl-5b6b792cd49d65536ee282ebeaac850ac64f12f9.zip
tktreectrl-5b6b792cd49d65536ee282ebeaac850ac64f12f9.tar.gz
tktreectrl-5b6b792cd49d65536ee282ebeaac850ac64f12f9.tar.bz2
Fixed a bug with dynamic-option code incrementing the refcount of a NULL Tcl_Object.
Diffstat (limited to 'generic/tkTreeUtils.c')
-rw-r--r--generic/tkTreeUtils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkTreeUtils.c b/generic/tkTreeUtils.c
index 235714b..4c962ad 100644
--- a/generic/tkTreeUtils.c
+++ b/generic/tkTreeUtils.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2002-2006 Tim Baker
*
- * RCS: @(#) $Id: tkTreeUtils.c,v 1.45 2006/10/26 03:00:32 treectrl Exp $
+ * RCS: @(#) $Id: tkTreeUtils.c,v 1.46 2006/10/28 01:21:51 treectrl Exp $
*/
#include "tkTreeCtrl.h"
@@ -5059,7 +5059,8 @@ dbwin("DynamicCO_Set id=%d saveInternalPtr=%p save=%p\n", cd->id, saveInternalPt
dbwin("saving object '%s'\n", *value ? Tcl_GetString(*value) : "NULL");
#endif
*objPtrPtr = *value;
- Tcl_IncrRefCount(*value);
+ if (*value != NULL)
+ Tcl_IncrRefCount(*value);
}
*(DynamicCOSave **) saveInternalPtr = save;