From 0fa762719bffc33e4572872a2b1e3ca1e76ff431 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 19 Apr 2004 12:52:02 +0000 Subject: Fix to line layout cache use. When a line was retrieved from the line layout cache and then replaced with another that mapped to the same cache entry then there could be use of a deleted pointer. --- src/Editor.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 351ff86d8..af5caf46d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2614,6 +2614,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // and determine the x position at which each character starts. //ElapsedTime et; if (lineDoc != lineDocPrevious) { + ll.Set(0); ll.Set(RetrieveLineLayout(lineDoc)); LayoutLine(lineDoc, surface, vs, ll, wrapWidth); lineDocPrevious = lineDoc; -- cgit v1.2.3