From b9772fd4e83670dc7618ece6c79e91d6dee0ad1c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 20 Sep 2009 23:29:04 +0000 Subject: Moved line width calculation code so that it is protected from the possibility of a NULL pointer. --- src/Editor.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index d6fe5eb6a..61008613d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3354,6 +3354,9 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { rcClient.right, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } + + lineWidthMaxSeen = Platform::Maximum( + lineWidthMaxSeen, ll->positions[ll->numCharsInLine]); //durCopy += et.Duration(true); } @@ -3364,8 +3367,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { yposScreen += vs.lineHeight; visibleLine++; - lineWidthMaxSeen = Platform::Maximum( - lineWidthMaxSeen, ll->positions[ll->numCharsInLine]); //gdk_flush(); } ll.Set(0); -- cgit v1.2.3