mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 08:30:59 +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
f006045995
commit
47145c6c46
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>
|
||||
|
||||
* Source/GSAutocompleteWindow.m (-computePosition): Check the scrollview
|
||||
|
|
|
@ -927,10 +927,13 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
{
|
||||
GSRepData *repd;
|
||||
|
||||
repd = [GSRepData new];
|
||||
repd->rep = RETAIN(imageRep);
|
||||
[_reps addObject: repd];
|
||||
RELEASE(repd);
|
||||
if (imageRep != nil)
|
||||
{
|
||||
repd = [GSRepData new];
|
||||
repd->rep = RETAIN(imageRep);
|
||||
[_reps addObject: repd];
|
||||
RELEASE(repd);
|
||||
}
|
||||
}
|
||||
|
||||
- (void) addRepresentations: (NSArray *)imageRepArray
|
||||
|
@ -2388,6 +2391,11 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
depth: [[NSScreen mainScreen] depth]
|
||||
separate: _flags.cacheSeparately
|
||||
alpha: [rep hasAlpha]];
|
||||
if (cacheRep == nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
repd = [GSRepData new];
|
||||
repd->rep = cacheRep;
|
||||
repd->original = rep; // may be nil!
|
||||
|
|
Loading…
Reference in a new issue