IDE: prevent crash when Object Inspector is not assigned and project is compiled. Caused by r39082 #3b90468c10

git-svn-id: trunk@39091 -
This commit is contained in:
juha 2012-10-15 11:16:50 +00:00
parent b6d52157c8
commit ec95f00f98

View File

@ -3068,7 +3068,8 @@ begin
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 @@ begin
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);