From 393b9de9d9efcebe12bc1338c40fe880f5ad637e Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 13 Mar 2010 16:28:17 +0000 Subject: [PATCH] ide: options dialog: fix crash on loading compiler configuration (issue #0015739) git-svn-id: trunk@23974 - --- ide/frames/compiler_path_options.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ide/frames/compiler_path_options.pas b/ide/frames/compiler_path_options.pas index d60639a3c7..f6d911cc54 100644 --- a/ide/frames/compiler_path_options.pas +++ b/ide/frames/compiler_path_options.pas @@ -160,9 +160,11 @@ end; procedure TCompilerPathOptionsFrame.DoLoadSave(Sender: TObject); var + OldOptions: TBaseCompilerOptions; Options: TBaseCompilerOptions; ImportExportResult: TImportExportOptionsResult; begin + OldOptions := FCompilerOpts; Options := TBaseCompilerOptionsClass(FCompilerOpts.ClassType).Create(FCompilerOpts.Owner); try DoSaveSettings(Options); @@ -172,6 +174,7 @@ begin if Assigned(OnLoadIDEOptions) then OnLoadIDEOptions(Self, Options); end; + Options := OldOptions; finally Options.Free; end;