Do not delete still referenced objects.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2998 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2014-05-03 16:57:05 +00:00
parent 041a6b2a36
commit b3b2c2aa22

View File

@ -886,7 +886,7 @@ var
begin begin
if (AObject = nil) then if (AObject = nil) then
exit; exit;
if (AObject.RefCount > 1) then if (AObject.RefCount > 0) then
raise EWstEditException.CreateFmt(s_CantDeleteStillReferencedObject,[AObject.Name]); raise EWstEditException.CreateFmt(s_CantDeleteStillReferencedObject,[AObject.Name]);
sct := ASymbolTable.CurrentModule.InterfaceSection; sct := ASymbolTable.CurrentModule.InterfaceSection;
sct.Declarations.Extract(AObject); sct.Declarations.Extract(AObject);