mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 15:29:32 +02:00
Menu designer: Prevent a crash when OI was closed. Issue #31152, patch from AlexeyT.
git-svn-id: trunk@53817 -
This commit is contained in:
parent
95cacda273
commit
3fe2624774
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user