* Source/NSTextView.m (-readSelectionFromPasteboard:type:): Fix

potential memory leak for colour pasting.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29992 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-03-17 09:36:19 +00:00
parent b81434b7d0
commit 8f43eb6c4e
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2010-03-17 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m (-readSelectionFromPasteboard:type:): Fix
potential memory leak for colour pasting.
2010-03-16 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSSliderCell.m:

View file

@ -2999,7 +2999,7 @@ Scroll so that the beginning of the range is visible.
return available != nil;
}
else
return NO;
return NO;
}
if (sel_eq(action, @selector(selectAll:))
@ -4606,14 +4606,14 @@ right.)
{
/* This is an attribute change, so we use a different range. */
NSRange aRange = [self rangeForUserCharacterAttributeChange];
NSColor *color = [NSColor colorFromPasteboard: pboard];
NSMutableDictionary *d = [[self typingAttributes] mutableCopy];
if (aRange.location != NSNotFound &&
[self shouldChangeTextInRange: aRange
replacementString: nil])
{
NSColor *color = [NSColor colorFromPasteboard: pboard];
NSMutableDictionary *d = [[self typingAttributes] mutableCopy];
[self setTextColor: color range: aRange];
[d setObject: color forKey: NSForegroundColorAttributeName];
[self setTypingAttributes: d];