mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 14:40:56 +00:00
Fixed memory problem in copying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7596 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d6114c1a73
commit
15af8c11e0
1 changed files with 3 additions and 0 deletions
|
@ -97,6 +97,9 @@ static Class cellClass;
|
||||||
id c = NSCopyObject(self, 0, zone);
|
id c = NSCopyObject(self, 0, zone);
|
||||||
NSCell *o = [_cell copy];
|
NSCell *o = [_cell copy];
|
||||||
|
|
||||||
|
/* Prevents the original cell from being released */
|
||||||
|
((NSControl *)c)->_cell = nil;
|
||||||
|
|
||||||
[c setCell: o];
|
[c setCell: o];
|
||||||
RELEASE(o);
|
RELEASE(o);
|
||||||
return c;
|
return c;
|
||||||
|
|
Loading…
Reference in a new issue