Menu designer: Prevent a crash when OI was closed. Issue , patch from AlexeyT.

git-svn-id: trunk@53817 -
This commit is contained in:
juha 2016-12-31 13:11:35 +00:00
parent 95cacda273
commit 3fe2624774

View File

@ -31,7 +31,7 @@ uses
Controls, StdCtrls, ExtCtrls, Forms, Graphics, Buttons, Menus, ButtonPanel,
ImgList, Themes, LCLintf, LCLProc,
// IdeIntf
FormEditingIntf, PropEdits,
FormEditingIntf, PropEdits, ObjectInspector,
// IDE
LazarusIDEStrConsts, MenuDesignerBase, MenuShortcuts;
@ -587,12 +587,18 @@ begin
end;
procedure TMenuDesignerForm.EndUpdate;
var
OI: TObjectInspectorDlg;
begin
if FUpdateCount<=0 then
RaiseGDBException('');
Dec(FUpdateCount);
if FUpdateCount = 0 then
OnDesignerSetSelection(FormEditingHook.GetCurrentObjectInspector.Selection);
begin
OI := FormEditingHook.GetCurrentObjectInspector;
if Assigned(OI) then
OnDesignerSetSelection(OI.Selection);
end;
end;
function TMenuDesignerForm.IsUpdate: Boolean;