From b1a58e1ce205e31bf1b73ea600d85acc64fd4f7a Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 26 Dec 2011 23:30:56 +0000 Subject: [PATCH] In TMainform.SetupSynEditors, check if loop editor variable really exists - which is not the case for at least one user. Fixes issue #2651. --- source/main.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/main.pas b/source/main.pas index beee0eb1..3892b7d0 100644 --- a/source/main.pas +++ b/source/main.pas @@ -9309,6 +9309,9 @@ begin BaseEditor.Options := BaseEditor.Options - [eoTabsToSpaces]; ActiveLineColor := StringToColor(GetRegValue(REGNAME_SQLCOLACTIVELINE, ColorToString(DEFAULT_SQLCOLACTIVELINE))); for i:=0 to Editors.Count-1 do begin + // See issue #2651: + if Editors[i]=nil then + Continue; Editor := Editors[i] as TSynMemo; if Editor = nil then continue;