mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
([Collection -empty]): Check if already empty. This avoids a previous
malloc(0). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e56d03e1d6
commit
91b8d2f393
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,8 @@ send_release(elt e)
|
|||
/* May be inefficient. Could be overridden; */
|
||||
- empty
|
||||
{
|
||||
if ([self isEmpty])
|
||||
return self;
|
||||
if (CONTAINS_OBJECTS)
|
||||
[self _safeWithElementsCallNoRetain:send_release];
|
||||
[self _empty];
|
||||
|
|
Loading…
Reference in a new issue