Fix bad return of proxy to user code

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28556 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-08-27 14:57:00 +00:00
parent fb3b2d3d19
commit 01249da35e
3 changed files with 2 additions and 7 deletions

View file

@ -2,6 +2,7 @@
* Source/NSImage.m: Image naming fixes so that setting nil as a name
works (so themes can replace/override system images).
* Source/GSTextStorage.m: Fix incorrect return of proxy to user code.
2009-08-26 18:53-EDT Gregory John Casamento <greg.casamento@gmail.com>

View file

@ -37,7 +37,6 @@
{
NSMutableString *_textChars;
NSMutableArray *_infoArray;
NSString *_textProxy;
}
@end

View file

@ -512,11 +512,7 @@ _attributesAtIndexEffectiveRange(
- (NSString*) string
{
if (_textProxy == nil)
{
_textProxy = RETAIN([_textChars immutableProxy]);
}
return _textProxy;
return [[_textChars copy] autorelease];
}
- (NSDictionary*) attributesAtIndex: (unsigned)index
@ -815,7 +811,6 @@ changeInLength: [aString length] - range.length];
- (void) dealloc
{
TEST_RELEASE(_textProxy);
RELEASE(_textChars);
RELEASE(_infoArray);
[super dealloc];