Permalink
Browse files

IDE: prevent crash when Object Inspector is not assigned and project …

…is compiled. Caused by r39082

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@39091 4005530d-fff6-0310-9dd1-cebe43e6787f
  • Loading branch information...
juha
juha committed Oct 15, 2012
1 parent 5db48cc commit 1aecf799ad9b405c87cc506a412ac243504c2bb7
Showing with 4 additions and 2 deletions.
  1. +4 −2 ide/main.pp
View
@@ -3068,7 +3068,8 @@ procedure TMainIDE.OnProcessIDECommand(Sender: TObject;
ecSave:
begin
- ObjectInspector1.GetActivePropertyGrid.SaveChanges;
+ if Assigned(ObjectInspector1) then
+ ObjectInspector1.GetActivePropertyGrid.SaveChanges;
if (Sender is TDesigner) or (Sender is TObjectInspectorDlg) then begin
if (Sender is TDesigner) then
GetDesignerUnit(TDesigner(Sender),ASrcEdit,AnUnitInfo)
@@ -8192,7 +8193,8 @@ function TMainIDE.PrepareForCompile: TModalResult;
end;
// Save the property editor value in Object Inspector
- ObjectInspector1.GetActivePropertyGrid.SaveChanges;
+ if Assigned(ObjectInspector1) then
+ ObjectInspector1.GetActivePropertyGrid.SaveChanges;
if MainBuildBoss.CompilerOnDiskChanged then
MainBuildBoss.RescanCompilerDefines(false,false,false,false);

0 comments on commit 1aecf79

Please sign in to comment.