diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkText.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index c1be9d9..0bca141 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.79.2.6 2010/02/21 13:23:13 dkf Exp $ + * RCS: @(#) $Id: tkText.c,v 1.79.2.7 2010/03/11 09:29:29 dkf Exp $ */ #include "default.h" @@ -4694,14 +4694,19 @@ DumpLine( name = "insert"; } else if (segPtr == textPtr->currentMarkPtr) { name = "current"; + } else if (markPtr->hPtr == NULL) { + name = NULL; + lineChanged = 0; } else { name = Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable, markPtr->hPtr); } - TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, - lineno, offset, &index); - lineChanged = DumpSegment(textPtr, interp, "mark", name, - command, &index, what); + if (name != NULL) { + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, + lineno, offset, &index); + lineChanged = DumpSegment(textPtr, interp, "mark", name, + command, &index, what); + } } else if ((what & TK_DUMP_TAG) && (segPtr->typePtr == &tkTextToggleOnType)) { TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, |