Sparta form designer: Try to prevent occational AV in handlers when closing IDE. Handlers should be unregistered somewhere!

git-svn-id: trunk@55618 -
This commit is contained in:
juha 2017-07-31 14:01:02 +00:00
parent ead7577fef
commit e794422659

View File

@ -1306,6 +1306,8 @@ var
LPageCtrl: TModulePageControl;
begin
Result := nil;
if (FormEditingHook = nil) or (GlobalDesignHook = nil) then
Exit;
LForm := FormEditingHook.GetDesignerForm(GlobalDesignHook.LookupRoot);
LFormData := FindDesignFormData(LForm);
if LFormData=nil then Exit;
@ -1617,6 +1619,8 @@ var
i: Integer;
LSourceWindow: TSourceEditorWindowInterface;
begin
if FormEditingHook = nil then
Exit;
LForm := FindDesignFormData(FormEditingHook.GetCurrentDesigner);
if LForm = nil then
Exit;