sparta: prevent crashing when a TMainMenu is detached (issue #32194).

git-svn-id: trunk@55582 -
This commit is contained in:
hnb 2017-07-24 22:11:43 +00:00
parent 7a619b7316
commit 0e58bb1477

View File

@ -670,6 +670,7 @@ var
begin
Result := False;
if (FDesignedForm<>nil) and (FDesignedForm.Form.Menu<>nil)
and not (csDestroying in FDesignedForm.Form.Menu.ComponentState)
and (FDesignedForm.Form.Menu.Items.Count>0)
then
for I := 0 to FDesignedForm.Form.Menu.Items.Count-1 do