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
if (AObject = nil) then
exit;
if (AObject.RefCount > 1) then
if (AObject.RefCount > 0) then
raise EWstEditException.CreateFmt(s_CantDeleteStillReferencedObject,[AObject.Name]);
sct := ASymbolTable.CurrentModule.InterfaceSection;
sct.Declarations.Extract(AObject);