mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:41:55 +00:00
* Source/NSImage.m: Better protection against representation being nil.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37169 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5b6909179
commit
a00b4fa98f
2 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-09-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSImage.m: Better protection against representation being nil.
|
||||||
|
|
||||||
2013-09-29 German Arias <germanandre@gmx.es>
|
2013-09-29 German Arias <germanandre@gmx.es>
|
||||||
|
|
||||||
* Source/GSAutocompleteWindow.m (-computePosition): Check the scrollview
|
* Source/GSAutocompleteWindow.m (-computePosition): Check the scrollview
|
||||||
|
|
|
@ -927,10 +927,13 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
{
|
{
|
||||||
GSRepData *repd;
|
GSRepData *repd;
|
||||||
|
|
||||||
repd = [GSRepData new];
|
if (imageRep != nil)
|
||||||
repd->rep = RETAIN(imageRep);
|
{
|
||||||
[_reps addObject: repd];
|
repd = [GSRepData new];
|
||||||
RELEASE(repd);
|
repd->rep = RETAIN(imageRep);
|
||||||
|
[_reps addObject: repd];
|
||||||
|
RELEASE(repd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) addRepresentations: (NSArray *)imageRepArray
|
- (void) addRepresentations: (NSArray *)imageRepArray
|
||||||
|
@ -2388,6 +2391,11 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
||||||
depth: [[NSScreen mainScreen] depth]
|
depth: [[NSScreen mainScreen] depth]
|
||||||
separate: _flags.cacheSeparately
|
separate: _flags.cacheSeparately
|
||||||
alpha: [rep hasAlpha]];
|
alpha: [rep hasAlpha]];
|
||||||
|
if (cacheRep == nil)
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
repd = [GSRepData new];
|
repd = [GSRepData new];
|
||||||
repd->rep = cacheRep;
|
repd->rep = cacheRep;
|
||||||
repd->original = rep; // may be nil!
|
repd->original = rep; // may be nil!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue