From 04847e469db03faa027794a0aba5a111dd1d6990 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 26 Jun 2017 12:48:04 +0000 Subject: Fix [62c5b7a1d7]: [text] segfaults on replace. Patch from Christian Werner. --- generic/tkText.c | 1 + 1 file changed, 1 insertion(+) diff --git a/generic/tkText.c b/generic/tkText.c index 6ff1db9..e0dcc50 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -1491,6 +1491,7 @@ TextWidgetObjCmd( * Move the insertion position to the correct place. */ + indexFromPtr = TkTextGetIndexFromObj(interp, textPtr, objv[2]); TkTextIndexForwChars(NULL, indexFromPtr, deleteInsertOffset, &index, COUNT_INDICES); TkBTreeUnlinkSegment(textPtr->insertMarkPtr, -- cgit v0.12